Hi,
In order to create a responsive GUI I considered to let every action extend a so called NewThreadAction. Doing so, the actionPerformed code is executed outside the event dispatching
thread and thus the GUI (and the event handling)won't freeze during execution.
NewThreadAction has 2 abstract methods : performAction() and updateGUI(). PerformAction resides the code that will be executed in the seperate thread, updateGUI() updates the GUI.
The Swing Tutorial at Sun's site tells us that painting code - updateGUI() in my example - should only be executed in the Event Dispatching Thread and offers us a.o. the SwingUtilities' invokeLater(Runnable) to do so.
Now, I've tried to work this out but I'm not sure if I got this right.
Comments or suggestions are welcome.