I would like to change the cursor to Cursor.WAIT when executing potentially long operations in JavaFX application. I thought that Platform.runLater will help me:
this.getStage().getScene().setCursor(Cursor.WAIT);
Platform.runLater(new Runnable() {
@Override
public void run() {
// Do some stuff
getStage().getScene().setCursor(Cursor.DEFAULT);
}
});
But cursor does not change. Why doesn't this work?