Re: Accessing Swing component data



Ian Wilson wrote:
Knute Johnson wrote:
Do methods that don't modify Swing components have to be called from the EDT? Methods such as JTextField.getText(), JCheckBox.isSelected() etc.

Sun seem pretty clear on this.

"The single-thread rule: Swing components can be accessed by only one thread at a time. Generally, this thread is the event-dispatching thread."

Note: "accessed" and how it relates to JTextField.getText().

http://java.sun.com/products/jfc/tsc/articles/threads/threads1.html



Thanks, that was a good article.

--

Knute Johnson
email s/nospam/knute/
.