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: useScreenMenuBar+setJMenuBar and windowActivated+getOppositeWindow bugs?




On 18 Mar 2005, at 00:18, Greg Guerin wrote:

Lieven Dekeyser <email@hidden> wrote:

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.


And be sure to file real bug-reports: <http://developer.apple.com/bugreporter>

Yep, I was planning on doing so.

Posting to this list is not a bug report.

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

This email sent to email@hidden
References: 
 >Re: useScreenMenuBar+setJMenuBar and windowActivated+getOppositeWindow bugs? (From: Greg Guerin <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.