java - Changing the launch icon -
i replace java launch icon:
i starting application via spring , put icon here inside:
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
Post a Comment