Considering that Swing and AWT are ill-designed for what you're trying
to
do, I suspect it may be simpler to pretend there's only one menubar,
rather
than actually coding it that way. I've definitely had better luck
managing
the pretense than the actuality.
That's because the GUI and its connections to the controllers are
loaded from an abstract definition in an XML file. The abstract
definition is cross-platform, so it cannot suppose the availiability of
Actions, therefore simple references to the menu items are used to
change states.
If just do the window.invalidate-repaint-validate routine just as if
apple.laf.useScreenMenuBar is set to false in the example below, the
menu bar isn't even shown when manually resizing the windows.
What is it that setSize() does to make this hack work?
<...>
It's hard to say exactly what's going on. Look at the Java source to
find
out for sure.
I think I'll have to do that.. In the meantime, the setSize hack works.
FWIW, you can't rely on oppositeWindow being the window that's going to
lose ownership of a shared JMenuBar.
Yep, it was just something I came across while trying just about
everything to get this working.
Just checking for those "oh, but that's not a bug" answers from people
smarter than me before filing the real bug reports.. ;-)
Thanks,
--Lieven
_______________________________________________
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