Content deleted Content added
→Modal Execution: create secondary loop |
Changed a typo: 'sumbitted' to 'submitted' |
||
Line 20:
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>http://www.pushing-pixels.org/?p=368</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
The important requirement imposed on all messages is that they must be executed quickly for the GUI to stay responsive. Otherwise, the message loop is blocked and GUI freezing is experienced.
|