Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Swing / AWT / SWT
Search Coderanch
Advance search
Google search
Register / Login
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
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Ron McLeod
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
Swing / AWT / SWT
JMenu Listener?
Nikos Stavros
Ranch Hand
Posts: 243
I like...
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Will this work, it didn't for me
JMenu jMenu; jMenu.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){ JOptionPane.showMessageDialog(mb, aboutText); } });
Jesus lives
Nick Meverden
Ranch Hand
Posts: 59
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
Marshal
Posts: 80983
530
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
It seems that a JMenu doesn't fire an ActionEvent when you click it.
Try a JMenuItem instead.
Nikos Stavros
Ranch Hand
Posts: 243
I like...
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I want a message when JMenu is clicked
Jesus lives
Nick Meverden
Ranch Hand
Posts: 59
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
check out javax.swing.JMenu.addMenuListener()
and
javax.swing.event.MenuListener/MenuEvent API's
permaculture is giving a gift to your future self. After reading this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
menu in loop
JMenu problem
Error when calling a constructor
Using ItemListener on a JMenu
How to create horizontal menus
More...