Swing
Re: Threads and Swing
Date: Fri, 16 May 2003 08:23:10 +0000 (UTC)Newsgroups: comp.lang.java.programmer
Size: 688 bytes
Mark Preston <email-address-deleted> writes: > Yes, you had - but somehow no-one ever got around to telling me that > huge great swathes of the Swing GUI are _not_ thread-safe. I guess everyone assumes that you know. Every introduction to Swing mentions it. And the better introductions, courses and tutorial also explain how to synchronize a separate thread with the Swing event dispatching thread (Swing's thread from which changes to the GUI should be done): invokeLater() or invokeAndWait() and a Runnable with the code that should be executed from the EDT. There is also a Sun TSC article where Sun explains why they didn't go for a thread save Swing implementation. /Thomas
