This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Icons

 
Rusty Shackleford
Ranch Hand
Posts: 490
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to add standard icons to specific JMenuItem. ie a disk icon to Save, scissors to cut, ect.

Do these icons come with java, if so how do I access them? Or do I need to find free ones online and add them? I found a bunch of icons from sun under documents and settings, but most are of the emoticon type.

Also, how can I change the icon on the top bar, the coffee cup, to a custom icon?
[ June 25, 2006: Message edited by: Rusty Shackleford ]
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> how can I change the icon on the top bar, the coffee cup, to a custom icon?

frame.setIconImage(new ImageIcon("test.gif").getImage());

for the icons, search your files for save.gif, java has some under demo/...
 
Rusty Shackleford
Ranch Hand
Posts: 490
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you

Any idea on how to change the coffee cup?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this didn't work?

frame.setIconImage(new ImageIcon("test.gif").getImage());
 
Rusty Shackleford
Ranch Hand
Posts: 490
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It did, thanks alot! Slight typo I missed.
 
Jared Cope
Ranch Hand
Posts: 243
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Originally posted by Rusty Shackleford:

Do these icons come with java, if so how do I access them? Or do I need to find free ones online and add them? I found a bunch of icons from sun under documents and settings, but most are of the emoticon type.


Sun has a free repository of icons that they encourage you to use for consistency across Java GUI applications. You might like to have a look here to see if it has what you need:

http://java.sun.com/developer/techDocs/hi/repository/

Cheers, Jared.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic