Skip to main content

Blog Archive for kschaefe during January 2011

The first rule of Swing programming is to always interact with Swing components in the Event Dispatch Thread (EDT, for short).  Swing is single-threaded (as a lot of UI toolkits are) and as such it can only makes guarantees about the state of Swing components when interacted with properly on the EDT.  Some Swing methods are thread-safe, such as JComponent.repaint.  Recently, I...