Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
Java Correct (Buffered)Image Loading
SUBMITTED BY:
Guest
DATE:
Dec. 6, 2013, 5:52 p.m.
FORMAT:
Java
SIZE:
253 Bytes
Raw
Download
Tweet
HITS:
785
Go to comments
Report
//Tutorial how to correctly load an internal (inside the JAR) (buffered)image in Java:
try
{
ImageName
=
IamgeIO
.
read
(
YourClassName
.
class
.
getResource
(
"/package1/package2/filename.png"
));
}
catch
(
IOException
e
){
e
.
printStackTrace
();
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus