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!

modify javax.swing.jMenuItem graphics

Status
Not open for further replies.

Raywall

Programmer
Oct 1, 2003
51
RO
Hi there, is there any way I could change the way a JMenuItem looks(I would like to change the background for instance and maybe display a custom image when the menu item is selected).
The getGraphics() method returns null so...
Should I extend the class instead and overwrite paint method ?
Thanks in advance.
 
Doesn't the Sun JDK come with a demo of the SwingSet plus source code? If I recall, there is one which has 'tarted-up' menus. You should look there for example code.

Tim
 
Yes you are right. I found something in Metalworks.
Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top