This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have created one swings application using Eclipse IDE. I want to use it by creating a jar file.
The app has many images used in the panels as well as tables. These images are displayed properly when I run my project in eclipse.
But when I make a jar these images are not displayed.
Here is the way I am using images :
My project folder is on desktop having following path and I am storing images inside Create 2\images .. where Create 2 is the name of my project folder or project.
C:\Documents and Settings\25466\Desktop\Create 2\images
Then I am referring these images inside code using following path :
ImagePanel panel = new ImagePanel(new ImageIcon("images/banner.PNG").getImage());
Please let me know what is going wrong ..where I can place the images folder so that they are displayed in the jar too...
Joined: Feb 13, 2010
I am able to resolve this issue ... I used following code ...