
Event Thread and Painting
Java uses the event thread to notify listeners of events by making calls to methods such as actionPerformed() and itemStateChanged(). However, this same thread is also responsible for repainting components. As a result, if your event handling code causes the thread to wait or to perform some long-running operation, your