I finally finished my first real program and have been trying to put some finishing touches on it. One of these finishing touches was packaging it up with icons and everything. The problem is, the icon only shows when I run the jar from the terminal. For example, when I double click the jar to run it I only see the Duke mascot. I am activating the same jar file, but in different ways and getting different results.
Example 1 (Terminal).
Notice how the icon does show up in my tray.
Example 2 (Double Click).
Notice how the icon does not show up in my tray.
Does anyone know how to fix this or what the problem even is?
Thanks so much.
Edit 1: Code
URL iconURL = getClass().getResource("notebook_builder_icon.gif");
ImageIcon icon = new ImageIcon(iconURL);
frame.setIconImage(icon.getImage());