Win a copy of Pragmatic AI this week in the Artificial Intelligence forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Want to display image along with text in MenuItem  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
setIcon(new ImageIcon("$/zz.gif"));
 
Premila Anguraj
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!