I have built a Swing GUI and wish to distribute it as a jar file. I used icons for some buttons, and would like to put the icon images in the jar file (know how to do this) and have my code reference said images (do not know how to do this).
This is the code I use to place the icon image on the button
I know that I can place the images in the jar file with the command
For cliffs, my question is; How do I find the images in the jar file so that my GUI runs with visible buttons?
This is the code I use to place the icon image on the button
Code:
pause.setIcon(new ImageIcon("pause.png"));
I know that I can place the images in the jar file with the command
Code:
jar -cvmf manifest.txt gui.jar *.class *.png
For cliffs, my question is; How do I find the images in the jar file so that my GUI runs with visible buttons?