2008. 10. 30. 09:50 Computer/JAVA
SWT 마우스 커서 변경.(모래시계)
Runnable longJob = new Runnable() {
boolean done = false;
int id;
public void run() {
Thread thread = new Thread(new Runnable() {
public void run() {
display.syncExec(new Runnable() {
public void run() {
try{
Thread.sleep(5000);
}catch(Exception e){
}
}
});
done = true;
display.wake();
}
});
thread.start();
while (!done && !compo.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
}
};
BusyIndicator.showWhile(display, longJob);
출처 : Java2s.com
본문에서 약간 수정한 부분이 있습니다.