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)
“A just thinker will allow full swing to his skepticism. I dip my pen in the blackest ink, because I am not afraid of falling into my inkpot.”
—Ralph Waldo Emerson (18031882)
“Oh sure, everyone goes back to the earth at some point, but life itself is a thread that is never broken, never lost. Do you know why? Because each man makes a knot in the thread during his lifetime: it is the work he has done and thats what gives life to life in the long stretch of time: the usefulness of man on this earth.”
—Jacques Roumain (19071945)
“He had a gentleman-like frankness in his behaviour, and as a great point of honour as a minister can have, especially a minister at the head of the treasury, where numberless sturdy and insatiable beggars of condition apply, who cannot all be gratified, nor all with safety be refused.”
—Philip Dormer Stanhope, 4th Earl Chesterfield (16941773)