This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Icons

 
Karen Baog
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Trying to learn putting icons on buttons.
The icon shows when I run it, but the description is not shown.
Am I missing something?

 
James Carman
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What description? You haven't told the JButton which text you want it to display.
 
Karen Baog
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi James,

How do I add an icon and a description to the button?
I'm playing with the ImageIcon, thinking that the second argument will provide the description. I think I'm wrong here. Now, I don't know what to do.
 
Karen Baog
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I figured it out.

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic