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)

    The bells, I say, the bells break down their tower;
    And swing I know not where.
    Hart Crane (1899–1932)

    Tom Hyde, the tinker, standing on the gallows, was asked if he had anything to say. “Tell the tailors,” said he, “to remember to make a knot in their thread before they take the first stitch.” His companion’s prayer is forgotten.
    Henry David Thoreau (1817–1862)

    The Declaration [of Independence] was not a protest against government, but against the excess of government. It prescribed the proper role of government, to secure the rights of individuals and to effect their safety and happiness. In modern society, no individual can do this alone. So government is not a necessary evil but a necessary good.
    Gerald R. Ford (b. 1913)