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: AWT Frame with constant height-width ratio



I encourage you to test it on different machines because invokeLater does not work on my machine.

I am running a 1G/512Mb TiBook with 10.3.9.

By the way, can anyone suggest a reason we have to delay the resize() at all? Why doesn't a resize() Just Work?



On Jul 16, 2005, at 6:11 PM, Elliotte Harold wrote:

Adrian Sutton wrote:

If you haven't already tried it, give SwingUtilities.invokeLater to
schedule the resize instead of Thread.sleep. Sleeping the Swing thread
is generally going to be a bad idea but invokeLater will just schedule
the resize to occur later (after the current event has finished). Might
be more robust.

I've now tried it both ways and they both seem to work. (Thanks, by the way. This had been driving me up the wall.) They both feel about equally jerky, but manageable. For the moment I've decided to go with SwingUtilities.invokeLater() since it seems less fundamentally dangerous than sleeping the AWT thread.

_______________________________________________ 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: AWT Frame with constant height-width ratio (From: "Adrian Sutton" <email@hidden>)
 >Re: AWT Frame with constant height-width ratio (From: Elliotte Harold <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.