The following code works when running the NetBeans IDE.
this.getFrame().setIconImage(Toolkit.getDefaultToolkit().getImage("PlagiaLyzerIcon.png"));
However, once it was built into Jar file, the icon was gone.
Anyone has idea what's the problem? I realized I've to put the icon image on the root directory, however, after compiling into JAR, the icon gone.
Thanks for any help..
Hi everyone, the problem was solved with the following code,
this.getFrame().setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getClassLoader().getResource("plagialyzer/resources/PlagiaLyzerIcon.png")));
It works once compiled into jar file. ^^