Mailing Lists: Apple Mailing Lists

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

Re: JPopupMenu and UseScreenMenuBar



2008/9/4 Brian Cabana <email@hidden>
Thanks Sergiy,

Dunno how about events in screen menu bar but one possible way would be to go throw your JMenu's and addMenuListener(...); to it. In menuSelected() you could hide your PopupMenu's.

That solution works great for all but the first "application" menu that is created by the OS.
Ugh, menuBar.getMenu(0) actually returnes the 1st menu item and not the 0th application menu.
Maybe you could try to get the UI class name of your MenuBar with UIManager.get("MenuBarUI");,
than get menubar.getUI() + cast it to that class and look whether this class has some usefull public
methods for your problem? But I don't know where you can obtain a source code/javadocs from the
apple.laf.* classes.

--
vi is [[13~^[[15~^[[15~^[[19~^[[18~^ a
muk[^[[29~^[[34~^[[26~^[[32~^ch better editor than this emacs. I know
I^[[14~'ll get flamed for this but the truth has to be
said. ^[[D^[[D^[[D^[[D ^[[D^[^[[D^[[D^[[B^
exit ^X^C quit :x :wq dang it :w:w:w :x ^C^C^Z^D
-- seen on alt.religion.emacs

 _______________________________________________
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

References: 
 >JPopupMenu and UseScreenMenuBar (From: "Brian Cabana" <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.