Event Dispatching Thread - Swing and Thread Safety

Swing and Thread Safety

Most AWT and Swing object methods are not thread safe: invoking them from multiple threads risks thread interference or memory consistency errors. To avoid these problems, Swing standards state that all user interface components should be created and accessed only from the AWT event dispatch thread. A popular third-party Look and Feel named Substance goes as far as to refuse to instantiate any Swing component when not running within the Event Dispatch Thread, to prevent such a coding mistake from occurring.

Read more about this topic:  Event Dispatching Thread

Famous quotes containing the words swing and, swing, thread and/or safety:

    The thirst for adventure is the vent which Destiny offers; a war, a crusade, a gold mine, a new country, speak to the imagination and offer swing and play to the confined powers.
    Ralph Waldo Emerson (1803–1882)

    Every profound new movement makes a great swing also backwards to some older, half-forgotten way of consciousness.
    —D.H. (David Herbert)

    First you find a little thread, a little thread leads you to a string, and the string leads you to a rope. And from the rope you hang by the ... neck.
    —A.I. (Albert Isaac)

    Man gives every reason for his conduct save one, every excuse for his crimes save one, every plea for his safety save one; and that one is his cowardice.
    George Bernard Shaw (1856–1950)