I load a .png file and display it in a JPanel when my program (see below) starts.
When I run it within eclipse the png is displayed correctly. However, when I export my program and run the executable jar file it doesn't. How do I include the .png file in my jar file?
I had posted the question in Eclipse forum but got no answer, so please help me.
My guess would be that your programm is just loading the png from where it is, but the png-file itself is not included in your project/jar.
In Eclipse you can just drag and drop the file into your projectfolder and eclipse will ask you, if you want to copy and safe it inside your project.
Knowledge Reigns Supreme
A teeny tiny vulgar attempt to get you to buy our stuff
a bit of art, as a gift, that will fit in a stocking