Unregistered
|
|
If all the gui components need to be constructed on EDT, how do you show a startup progress bar while you are setting up the rest of the application (typically loading and constructing the other gui classes)
|
JohnZ
Unregistered
|
|
This is done as part of the splash screen.
See the example here:
http://java.sun.com/developer/JDCTechTips/2005/tt1115.html
|
Unregistered
|
|
I'd suggest a less restrictive rule:
Execute outside the UI thread all the initialization except the event handling configuration.
This is:
on a parallel thread: button.setCaption(...) button.setSize(...) frame.add(button)
and serializing the execution og: button.addCommandListener(...) frame.addXListener(...)
that ensures that the code that can enqueue UI-thread-executed workers is executed from the UI-thread. This code is the event-handling code, but all the component-creation code remains in parallel.
|