I’ve managed to replace the java coffee cup in the corner with my own icon, however my application has about 13 frames, and when I manually call the icon like I did on my mainframe it says cannot find symbol getframe().
Any idea how to set the default icon to the icon the main frame has? I used this code to apply my icon to the main frame:
URL url = ClassLoader.getSystemResource("calculatormedii/resources/CMed1.png");
Toolkit kit = Toolkit.getDefaultToolkit();
Image img = kit.createImage(url);
getFrame().setIconImage(img);
“sub frames” should be a JDialog and not a JFrame. The dialog will inherit the icon automatically as long as you specify the frame as the parent of the dialog in the constructor.