A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Swing / AWT / SWT
Joined: Sep 10, 2008
Mar 26, 2009 10:00:21
Is there a way to get a
to expand its menus when clicking instead of when hovering the mouse over the menu?
Joined: Jul 26, 2007
Mar 26, 2009 11:16:02
So you want to expand/collapse the submenus on mouse movements.
You can get the result by subclassing
and adding a mouse listener to detect the mouse entered and mouse exited events. Check out JMenu#fireMenuXXX methods.
Warning:Take this with a grain of salt. I haven't tried it myself.
Also check out
How to ask questions
Donate a pint, save a life!
Onff-turn it on!
I agree. Here's the link:
subject: JPopupMenu question
Problem while working with JPopupMenu
How to make JPopupMenu invisible?
show and hide a JPopupMenu
Scrolling JPopup Menu
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014