Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

JPopupMenu and UseScreenMenuBar



Hi Gents,

I am writing a multi-platform application where I popup JPopupMenus from a button in a frame's toolbar.  In Windows, the popup is dismissed when I click on a menu item in the menu bar.  However in OSX with the useScreenMenuBar set to true, the popup is no longer dismissed when I open a menu from the screen menu. The popup eventually gets dismissed as a result of a menu item selection change notification.
I set a breakpoint where the JPopupMenu is dismissed and found that on Windows, the popup is dismissed by an AWTEventListener in javax.swing.plaf.BasicPopupMenuUI.  This same AWTEventListener is not notified when a mouse pressed occurs in the screen menu bar.  I assume that it is because the screen menu items don't go through the save event dispatch as the swing components in the app.

Is there a way to get notified of events in the screen menu bar, specifically mouse events?

--
Brian Cabana
Software Engineer
Quantrix

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.