Given:
BorderPane root = new BorderPane();
GridPane block = new GridPane();
block.addRow(0, new Text("HELLO"));
ScheduledExecutorService someScheduler = Executors.newScheduledThreadPool(4);
someScheduler.schedule(() -> {
System.out.println("IN");
block.addRow(1, new Text("WORLD"));
System.out.println("OUT");
}, 2, TimeUnit.SECONDS);
root.setCenter(block);
Scene scene = new Scene(root, 1280, 720);
primaryStage.setScene(scene);
primaryStage.show();
Shouldn't the GridPane add a row after 2 seconds? The Output reaches the IN but never the OUT. Can someone explain this behaviour to me?