java - Changing the launch icon -


i replace java launch icon:

enter image description here

i starting application via spring , put icon here inside:

enter image description here

i starting gui mainwindow extends jframe:

/**  * starts gui  */ public void start() {                    javax.swing.swingutilities.invokelater(new runnable() {         public void run() {             toolkit.getdefaulttoolkit().getimage(mainwindow.class.getresource("icon.png"));             makelayout();            }     }); } 

however icon not change. recommendation do?

i appreciate answer!

toolkit.getdefaulttoolkit().getimage() returns image, not doing it. need use seticonimage(). try this...

seticonimage(toolkit.getdefaulttoolkit().getimage(     mainwindow.class.getresource("icon.png"))); 

Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

Error while updating a record in APEX screen -

single sign on - Logging into Plone site with credentials passed through HTTP -