No. I just meant to reiterate Json's point - access your image relative to your application and not relying on something like:
'c:/pictures/mercuryLogo.jpg' actually being there. Using the class...
Type: Posts; User: copeg
No. I just meant to reiterate Json's point - access your image relative to your application and not relying on something like:
'c:/pictures/mercuryLogo.jpg' actually being there. Using the class...
Sorry, I mis-read your original post and thought you were just trying to create an ImageIcon. Anyway, from a URL you could create a 'dummy' ImageIcon and retrieve the image that way (getImage()) or...
An alternative method to load the image is to load it as a resource.
java.net.URL imgURL = getClass().getResource(path); //where path is a string path relative to your class
String pt =...