This post originated from an RSS feed registered with Java Buzz
by Max Zone.
Original Post: Getting Your Swing in a Spin
Feed Title: dzone.com: java
Feed URL: http://feeds.dzone.com/dzone/java
Feed Description: dzone.com: fresh java links for developers
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.