L
Lew
Daniel said:True, but you should use Runnable, not Thread!
Also, you should use EventQueue.invokeLater(), not the wrapper
SwingUtilities.invokeLater().
I thought the new wisdom was to use SwingWorker, which has marvelous lifecycle
methods.
<http://java.sun.com/javase/6/docs/api/javax/swing/SwingWorker.html>
That's what Brian Goetz, et al., say in /Java Concurrency in Practice/, anyway.
Of course, they also give the EventQueue advice, I suppose for those
situations where you don't need the full power of SwingWorker. They point out
that SwingUtilities.invokeLater() is a simple wrapper around the EventQueue
call, and exists only for really old versions of Java.