Swing + threads?

is it true that componenets in swing need extra care and modifications if the event handler does not modify the components ? (eg a thread should also be able to modify the componenets?
[198 byte] By [sseans] at [2007-9-26 1:24:40]
# 1

hi,

the rule is:

swing components are not thread-safe except some, and therefore they should only be changed from within the event dispatch thread. this can be accomplished using the methods invokeLater(Runnable) and invokeAndWait(Runnable) in class javax.swing.SwingUtilities.

best regards, Michael

Michael_Rudolf at 2007-6-29 1:05:05 > top of Java-index,Core,Core APIs...