I think it should be intuitive, but it is not to me...I wasted 2 hours to search on how to do so but so sad...
Please kindly advice on the correct step to change the icon of java program.
I think it should be intuitive, but it is not to me...I wasted 2 hours to search on how to do so but so sad...
Please kindly advice on the correct step to change the icon of java program.
The image should be placed in a source folder. In netbeans I created a folder in my src directory for non-java resources, mostly images. Then a similar dialog box to the one you show above allows me to choose items from this as icons. This should work for eclipse too.
You can also accomplish this just with code where res is a folder inside the src directory.
try {
ClassLoader cl = this.getClass().getClassLoader();
ImageIcon programIcon = new ImageIcon(cl.getResource("res/test.png"));
setIconImage(programIcon.getImage());
} catch (Exception whoJackedMyIcon) {
System.out.println("Could not load program icon.");
}