我有以下代码:
Button loadChunksButton = new Button("Load chunks");
loadChunksButton.setOnAction(new LoadChunksButtonListener());
GridPane gridPane = new GridPane();
gridPane.setMinSize(400, 200);
gridPane.setPadding(new Insets(10, 10, 10, 10));
gridPane.setVgap(5);
gridPane.setHgap(5);
gridPane.add(loadChunksButton, 0, 0);
gridPane.add(chunksListView, 0, 1);
gridPane.add(new Line(0, 0, 250, 250), 1, 1);
gridPane.add(new Line(0, 0, 250, 0), 1, 1);
结果如下面的屏幕。为什么这两行不是从同一点开始,尽管两者都指定了(0,0)作为起点?如何使用红色箭头指向的绝对值(0,0)?