| |||
| [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...
I don't think this is trivial at all. The Sun web page you are citing is several years outdated. During this time, Sun has changed the recommendations about whow to create GUI elements; they now suggest that everything (including the app frame creation) is done in the event thread. Many many examples on the web and in books still do things differently.
Our experience with Java apps over the past years has been that doing _everything_ Gui related in the event threat is becoming more and more important. We had "dirty" apps that accessed Gui elements from different threads which worked fine for years, but eventually became unstable. Moving Gui stuff the event thread seemed to solve the problem.
-Rolf -- Rolf Howarth Square Box Systems Ltd Stratford-upon-Avon UK. http://www.squarebox.co.uk _______________________________________________ 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>) | |
| >Re: intermittent hang on launch (From: Peter Richterich <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.