Welcome again Please UseCodeTags (← click) when posting code as it makes it easier for people to read your code. . . .UNfortunately there was a comment far too long which I have shortened by removing ----------------------------------Tony Docherty wrote:Welcome to the Ranch.
Tony Docherty wrote:Ignore that last reply, I've just noticed you are adding the JLabel dynamically. You need to revalidate the panel the JLabel has been added to.
I tried to do the revalidate method on my panel but it did not change the results. It is still not showing an image.
What difference will that make?Rez Sad wrote: . . . I needed to change the 'Exception' to 'InvalidParameterException' . . .
That is why the Java Tutorials tells you to use the get resource methods of the Class class to find an image.. . . the images folder that the program was searching for was not in the 'src' folder.. . . .
Don't get me started about those stupid light bulbs. |