Nick Petas wrote:I have this line in my code but it returns null although the file exists in the same folder as the java class :
Any ideas?
David is partly wrong. If the file is in the same location as the class file (so LabelFrame.class, not LabelFrame.java) then it is on the class path and it should be loaded properly. I think in your case you've put the image in the same folder with the source file, not the class file.