给出:
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();
2秒后GridPane是否应该添加一行?输出到达IN,但到达OUT。有人可以向我解释这种行为吗?
答案 0 :(得分:0)
给我一个镜头,我添加了blob
response