By bloid
via adtmag.com
Published: Aug 11 2006 / 00:54
Swing uses a single update thread, called the Event Dispatch Thread (EDT). Dancing around the EDT is a seemingly eternal problem faced by Swing developers. Put simply, you’re not allowed to update the GUI in a different thread to the EDT; and non-GUI stuff generally shouldn’t take place in the EDT, as this will cause the GUI to become unresponsive. Spin, makes use of Java’s powerful Dynamic Proxy capability. The result is code like that shown above, which – as long as you’re coding to Interfaces – just magically works.
Add your comment