Content deleted Content added
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags |
Citation bot (talk | contribs) Add: title. Changed bare reference to CS1/2. | Use this bot. Report bugs. | Suggested by BrownHairedGirl | Linked from User:BrownHairedGirl/Articles_with_bare_links | #UCB_webform_linked 118/2146 |
||
Line 22:
| publisher=[[Sun Microsystems]]
| accessdate=2011-10-02}}</ref>
Since programmers often miss this requirement, third-party [[Pluggable look and feel|Look and Feel]]s, like [http://java.net/projects/substance/ Substance] go as far as to refuse to instantiate any Swing component when not running within the Event Dispatch Thread,<ref>{{Cite web|url=http://www.pushing-pixels.org/?p=368|title=Stricter checks on EDT violations in Substance · Pushing Pixels}}</ref> to prevent such a coding mistake. Access to the GUI is serialized and other threads may submit some code to be executed in the EDT through a '''EDT message queue'''.
That is, likewise in other GUI frameworks, the Event Dispatching Thread spends its life pumping messages: it maintains a message queue of actions to be performed over GUI. These requests are submitted to the queue by system and any application thread. EDT consumes them one after another and responds by updating the GUI components. The messages may be well-known actions or involve callbacks, the references to user-methods that must be executed by means of EDT.
|