This post originated from an RSS feed registered with Java Buzz
by Scott Delap.
Original Post: Sun Tech Tip: Thread Handling in Swing
Feed Title: ClientJava.com
Feed URL: http://www.clientjava.com/archives/wireless_mobile.rdf
Feed Description: Client/Desktop Related Java Development
Sun Tech Tip: Thread Handling in Swing To increase efficiency and decrease complexity, all Swing components are designed not to be thread-safe. This simply means that all access to Swing components needs to be done from a single thread. That thread is called the event-dispatch thread, and it isn't one you create yourself. If you are unsure that your executing code is in the event-dispatch thread, you can query the EventQueue class through its static isDispatchThread() method. Alternatively, you can query the SwingUtilities class through its static isEventDispatchThread() method. The isEventDispatchThread() method acts as a proxy to the isDispatchThread() method...