aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Want to display image along with text in MenuItem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Want to display image along with text in MenuItem" Watch "Want to display image along with text in MenuItem" New topic
Author

Want to display image along with text in MenuItem

Premila Anguraj
Greenhorn

Joined: Jul 05, 2003
Posts: 3
Hi
I want to display image in AWT MenuItem. I can now display image along with text in JMenuItem. but i can't do with MenuItem. Any help in this regard is highly appreciated
[ July 05, 2003: Message edited by: Premila Anguraj ]
daniel xiao
Greenhorn

Joined: Jul 04, 2003
Posts: 12
setIcon(new ImageIcon("$/zz.gif"));
Premila Anguraj
Greenhorn

Joined: Jul 05, 2003
Posts: 3
hi Daniel xiao

It'll be of great help if u give the complete coding to show image along with text in the MenuItem and the packages required cos i am unable to get it still . Also i think, by setIcon(ImageIcon img), u mean something related to org.apache.struts.tiles.beans package?
Abhik Sarkar
Ranch Hand

Joined: Jun 14, 2003
Posts: 61
Hi Premila,
I don't think it is possible to set an icon for an AWT MenuItem.
Regards,
Abhik.
[ July 09, 2003: Message edited by: Abhik Sarkar ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Want to display image along with text in MenuItem