Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to make the popup menu items disappear when the mouse is moved away

843806Nov 16 2007 — edited Nov 18 2007
I have a JMenuBar with JMenus and JMenuItems. I would like the popup menu items to disappear (setPopupMenuVisible(false)) and the menu to get deselected (setSelected(false)) when the user moves the mouse away from the popup menu items.

In other words I would like the same thing to happen as when the user moves the mouse on top of another menu.

How can I accomplish this?

Thanks for looking at this!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 16 2007
Added on Nov 16 2007
20 comments
757 views