Results 1 to 3 of 3
- 05-14-2009, 09:34 PM #1Member
- Join Date
- Apr 2009
- Rep Power
Read a couple forums posts on setting the application icon... (ie replacing the java icon)...
I'm using the code, but its just not working... I have the worldicon.png in the same package this code is running in. Does it need to be in resources or am I using the wrong call?
mainScreen = new MainScreen(mainScreenDriver); mainScreen.setIconImage(new ImageIcon("worldicon.png").getImage()); mainScreen.setVisible(true);
Do you know for a fact that you're looking in the right place for the "worldicon.png" file? If I didn't know, I'd create the image icon in a separate step and test if it's null or not. You know of course that java is looking at the System.getProperty("user.dir") location for your file.
for instance place this line in your code to see just where Java is looking for the png file:
- 05-15-2009, 07:12 AM #3