Content deleted Content added
m →External links: Link to a blogpost/article by me - IMHO rather relevant for this WP article. |
|||
Line 8:
from the EDT.
The method <code>invokeAndWait()</code> should never be called from the event dispatching thread—it will throw an [[Exception handling|exception]]. The method {{Javadoc:SE|javax/swing|SwingUtilities|isEventDispatchThread()}} or {{Javadoc:SE|java/awt|EventQueue|
Another solution for executing code in the EDT is using the ''[[SwingWorker|worker design pattern]]''. The <code>[[SwingWorker]]</code> class, developed by [[Sun Microsystems]], is an implementation of the worker design pattern, and as of Java 6 is part of standard Swing distribution. The open source project [http://foxtrot.sourceforge.net/ Foxtrot] provides another synchronous execution solution similar to <code>SwingWorker</code>.
|