Results 1 to 1 of 1
- 11-08-2012, 05:15 PM #1Member
- Join Date
- Nov 2012
- Rep Power
Question about using icons in exported jar
A very strange issue about using icons in my java code. If I run it inside eclipse, everything is fine. But in the exported jar, some icons are displayed properly, but most not.
The following is the way I load icon in my code:
this.icons = new Hashtable();
Class c = this.getClass();
icons.put(ABOUT, new ImageIcon(c.getResource("about24.gif")));
I checked online and it seems that this should be the right way to do it. I also checked jar file and all icons are included inside.
Any suggestions regarding this?
Thanks a lot
- By sherazam in forum Java SoftwareReplies: 0Last Post: 04-10-2012, 02:21 PM
- By kovalensue in forum AWT / SwingReplies: 3Last Post: 03-18-2011, 01:29 AM
- By Smokin' Caterpillar in forum JDBCReplies: 5Last Post: 10-18-2010, 10:26 AM
- By panic in forum New To JavaReplies: 9Last Post: 05-21-2009, 08:16 AM
- By xbox_nutter in forum New To JavaReplies: 4Last Post: 03-27-2009, 11:26 AM