Example:
File imageCheck = new File("picture.gif");
if(imageCheck.exists())
System.out.println("Image file found!");
else
System.out.println("Ima开发者_开发问答ge file not found!");
Image is in source directory and it wont show it on a button or on a label. I am working in Eclipse.
It should be in the project directory, not the source directory.
精彩评论