Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Loading a .gif for a toolbar...

 
Adam Till
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
I am trying to load a gif into my tool bar using:-
JButton helpButton = new JButton(new ImageIcon(File.separator + "help.gif"));
So it loads the gif from the currently executing class directory. But doesnt seem to work. How do I do it? Frustration is setting in and my skin color is going green, is this normal?
 
Adam Till
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The color has changed to red, of the beast of Embarasment. Sorted it.
Moved to file to the root of the class path.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic