Actually, Scott is correct. Doing the magic after pack and before
setVisible/show works without flickering. Just make sure you also
move any setSize calls after pack if that messes with your window.
----------------------------------------------
Matt Drance
DTS Engineer
Java - Dashboard - Address Book
email@hidden
On Jul 12, 2005, at 6:10 AM, Scott Palmer wrote:
On 11-Jul-05, at 12:34 PM, Matt Drance wrote:
Hi Tim,
There's no clean way to get a Cocoa-Java NSWindow that corresponds
to the one you want, but you can write a very light JAWT library
that will give you the NSView/Window corresponding to your popup and
then call setHasShadow:NO. Other developers have done this in the
past, however, because of how JAWT works the call won't work until
the component is first shown. That means there will be a slight
flicker as the shadow appears for the split second before your
setHasShadow call goes through.
I'm curious about this flicker issue.
As I understood things, a components native peer is "realized" when
you call pack(). The javadoc for pack() indicates that "If the window
and/or it's owne are not yet displayable, both are made displayable
before calculating the preferred size."
Generally I was under the impression that JAWT just needs to have the
native peer *displayable*, it doesn't have to be showing.
Is this not the case on the Mac?
Scott