Java Tutorial/SWT/SWT Thread
Версия от 17:44, 31 мая 2010; (обсуждение)
17. SWT Time-Consuming Operation UI Pattern
SWT does not allow non-UI threads to access user interface components directly.
Thread operationThread = new Thread() {
public void run() {
// time-consuming operations
display.asyncExec/syncExec(new Runnable() {
public void run() {
// UI Updating procedures go here ...
}
});
}
};
operationThread.start();
Professional Java Interfaces with SWT/JFace by Jackwind Li Guojie John Wiley & Sons 2005