In my GYM! , I use the following code to load icons/*** loadEmoticon method comment.*/public javax.swing.Icon loadEmoticon(int icon) {return new ImageIcon(EmoticonLoader.class.getResource(icon+".gif") );}