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