You need to figure out where it thinks it's loading the file from. You can use the File class to get the absolute path.
Type: Posts; User: KevinWorkman
You need to figure out where it thinks it's loading the file from. You can use the File class to get the absolute path.
Then you need to go through a process of elimination. Are you loading the file properly? Are you sure? Use a debugger or a print statement to test your assumptions. Can you add a text-only JLabel to...
You've posted when you add the BackgroundPanel to the JFrame. But what are you putting the image on? When are you adding that component to the BackgroundPanel?
That's fine, but you should never have an empty catch. At least put an e.printStackTrace() inside the catch block.
But anyway, when are you actually adding the JLabel to the JPanel?
Don't use empty catch blocks like that. Is there an Exception you're hiding from yourself?