I would like to change the default Java icon (the design of the cup). I used the code below in the constructors of JFrames of my system and it worked only when I run the system in Netbeans, but when I generate the executable can not start my program!
setIconImage(Toolkit.getDefaultToolkit().createImage(getClass().getResource("/ICONES/add.png")));