JaVa
   

A Recap on the Event Dispatch Thread

Before we go any further, we should recap the Event Dispatch Thread a little. As you know, the Event Dispatch Thread processes events from repaints to mouse events to action events, as we have seen in this chapter. Whenever a method is invoked as a result of one of these events, such as actionPerformed, mousePressed, paint, keyReleased, or windowClosing, all of which we have seen in previous chapters of the tutorial, they are all running in the Event Dispatch Thread. As we mentioned in , you are able to run your own code from another thread using the SwingUtilities static methods invokeAndWait and invokeLater.

JaVa
   
Comments