I'm trying to display a text in eclipse swt browser before the end of program execution, example:
button.addListener(SWT.MouseUp, new Listener() {
public void handleEvent() {
//Trying to print immediately
browser.setText("Example!");
// sleep for test purposes, simulating the program execution
try {
Thread.sleep(2000);
}
catch (InterruptedException e1) {
e1.printStackTrace();
}
// end;
}
});
As exemplified above, the program wait all execution to print "Example!".
