| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Rolf Howarth wrote:
Not that it's worth getting overly pedantic over such a trivial point, but constructing, packing and showing my main frame from within main() is a pattern I have followed for years and years and years without problem. Indeed, it's explicitly declared to be safe by Sun "An application's GUI can often be constructed and shown in the main thread", see http://java.sun.com/products/jfc/tsc/articles/ threads/threads1.html
The only caveat is that this has to be the FIRST bit of GUI code in your application. After you have created and shown any components and the event loop comes into existence then it's no longer safe. But if all you're doing is creating and showing a single frame then it's perfectly safe.
-- Peter Richterich _______________________________________________ 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
| References: | |
| >Re: intermittent hang on launch (From: Rolf Howarth <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.