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 (18031882)
“wherever we recognize the image of God let us reverence it; though it swing from the gallows.”
—Herman Melville (18191891)
“It may be the more
That no line of her writing have I,
Nor a thread of her hair,
No mark of her late time as dame in her dwelling, whereby
I may picture her there.”
—Thomas Hardy (18401928)
“... what a family is without a steward, a ship without a pilot, a flock without a shepherd, a body without a head, the same, I think, is a kingdom without the health and safety of a good monarch.”
—Elizabeth I (15331603)