aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JMenu Listener? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JMenu Listener?" Watch "JMenu Listener?" New topic
Author

JMenu Listener?

Nikos Stavros
Ranch Hand

Joined: Feb 24, 2006
Posts: 243

Will this work, it didn't for me


Jesus lives
Nick Meverden
Ranch Hand

Joined: Jul 03, 2006
Posts: 59
No an ActionListener isn't going to do anything for JMenu. It would be more helpful if you tell us what your are trying to do. You want to show a dialog message when JMenu is clicked?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39436
    
  28
It seems that a JMenu doesn't fire an ActionEvent when you click it.
Try a JMenuItem instead.
Nikos Stavros
Ranch Hand

Joined: Feb 24, 2006
Posts: 243

I want a message when JMenu is clicked
Nick Meverden
Ranch Hand

Joined: Jul 03, 2006
Posts: 59
check out javax.swing.JMenu.addMenuListener()

and

javax.swing.event.MenuListener/MenuEvent API's
 
 
subject: JMenu Listener?