• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMenu Listener?

 
Nikos Stavros
Ranch Hand
Posts: 243
Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Will this work, it didn't for me
 
Nick Meverden
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 50189
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems that a JMenu doesn't fire an ActionEvent when you click it.
Try a JMenuItem instead.
 
Nikos Stavros
Ranch Hand
Posts: 243
Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want a message when JMenu is clicked
 
Nick Meverden
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check out javax.swing.JMenu.addMenuListener()

and

javax.swing.event.MenuListener/MenuEvent API's
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic