SwingUtilities.invokeLater() and SwingUtilities.invokeAndWait() are two ways to start an event dispatch thread.
There is just one event dispatch thread. The two methods you named (which are actually aliases for EventQueue.invokeLater() and EventQueue.invokeAndWait()) will trigger an event on the existing EDT.
Anything that deals with painting the gui needs to be done in EDT.
Correct, but not just painting. All updates* to the GUI, including updating models, need to be done in the EDT.
* Well there are a few exceptions, like in JTextArea. All these exceptions are mentioned explicitly in the API.
If there is any task that would take more time to complete it needs to be done in Swing Worker Thread.
One can start a worker thread from an Event Dispatch thread.
Exactly. SwingWorker is a utility class you can use, but you can also use regular threads.
Am using Java5, is there a way to get the progress of a task done in a worker thread and get it displayed in the gui when the task in the worker thread is still running. I know there is a way to do this in Java6 but is there a way to do it in java5?
Since SwingWorker isn't part of the API in
Java 5 or before, you will either need to create / find a replacement for it, or simply use EventQueue.invokeLater.
Is it allowed/possible to start an EDT from inside another EDT.
As said before, you trigger events, you don't start an EDT.
invokeLater is allowed to be called from the EDT. invokeAndWait isn't though; it will throw an Error. Fortunately, there is a method called isDispatchThread(), so you can check:
Is it allowed to start an EDT from inside a Swing Worker Thread.
It is allowed to trigger events from inside a Swing Worker Thread. That's what the mechanism is there for.