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

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -