Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing JMenuItem look on the fly

Status
Not open for further replies.

GDameron

Programmer
Aug 8, 2003
39
US
I have a menu bar containing JMenuItems created using the (Action) constructor. The JMenuItems have both icons and text labels. How would I implement a "show/hide icons" capability? Is there a way to use JMenuItem's getComponent() method to remove/restore the icons without actually recreating the JMenuItems?

GD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top