• 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.
 
CLUCK LIKE A CHICKEN! Now look at this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!