0
BorderPane root = new BorderPane();
Button chooseFile = new Button("chooseFile");
TextField fileLocation = new TextField("C:/");
Button makeGrid = new Button("Solve");
HBox fileLoad = new HBox(chooseFile, fileLocation, makeGrid);
root.setTop(lastfil);
BorderPane.setAlignment(root, Pos.TOP_CENTER);
BorderPane.setMargin(root, new Insets(12,12,12,12));
root.setPrefSize(500, 500);
我有一些問題居中這一點,我想prefSize爲500 x 500,並有文件加載器頂部中心,但它不這樣做。這是最高的,但我無法把它推到最高的中心位置。任何明顯的我做錯了?無法Pos.CENTER在BorderPane