I have a problem adding ImageIcon to a JMenuItem. I added it just like it was written in the tutorial but it didn't work. I have checked on Google what's wrong and didn't find. This is the code:
File.add(new JMenuItem("New", new ImageIcon("images/new.gif")));
I thought the problem might be that the icon isn't in the same folder as the .class or .java files, so I have replaced it - and still not working. The menu shows just the text.. What should I do to make i work?