• Post Reply Bookmark Topic Watch Topic
  • New Topic

submenu's actionevent

 
chinna narasappa
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friend,

I am unable to connect if clicked on the submenu items it has to open like pop message window or report regarding selected submenu items,

give me solution, how to do?

Thanks & Regards
Narsappa
 
Campbell Ritchie
Marshal
Posts: 52519
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch

You can add an ActionListener to a JMenuItem, exactly the same as you would to a JButton; in fact if I remember correctly JMenuItem is a subclass of AbstractButton, so it is in fact a kind of button.

[edit]Add this bit: A JMenu is also a button for the same reason.[/edit]
[ September 15, 2008: Message edited by: Campbell Ritchie ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!