Can you make a small complete program that compiles, executes and shows the problem?
Does the code tell the container that the JLabel is added to that it needs to do a new layout of its contents?
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
file.getName() just returns the file name - any path info is lost. So unless the file happened to be in the current working directory it won't get found just from the name. You could try getting the full path & name to identify the file fully, eg file.getCanonicalPath() rather than just file.getName()
JamesCherrill
... trying to help
8,516 posts since Apr 2008
Reputation Points: 2,583
Solved Threads: 1,455
Skill Endorsements: 30