Event dispatching thread: Difference between revisions

Content deleted Content added
No edit summary
Line 1:
The '''event dispatching thread''' (EDT) is a background [[Thread (computer science)|thread]] used in [[Java (programming language)|Java]] to process events from the [[Abstract WindowingWindow Toolkit]] (AWT) [[graphical user interface]] [[event queue]]. These events are primarily update events that cause user interface [[Software componentry|components]] to redraw themselves, or input events from [[input device]]s such as the mouse or keyboard. The AWT uses a single-threaded painting [[Model (abstract)|model]] in which all screen updates must be performed from a single thread. The event dispatching thread is the only valid thread to update the visual state of visible user interface components. Updating visible components from other threads is the source of many common [[Software bug|bugs]] in Java [[Computer program|programs]] that use [[Swing (Java)|Swing]] <ref>This problem is not specific to Java [[Swing (Java)|Swing]]. There is the same issue in most [[Widget toolkit]]s, as for example [[Windows Forms]], where the [[BackgroundWorker]] class performs the same purpose as [[SwingWorker]] in Java.</ref>.
 
== Executing code in the EDT ==
Line 16:
 
== See also ==
* [[Abstract WindowingWindow Toolkit]] (AWT)
* [[Swing (Java)]]
* [[SwingWorker]]