如何在场景中心设置按钮?

How I can set the buttons on the center of the scene?

如何使我的按钮在垂直和水平方向上居中?
无论我使用什么 Pane 或 Vbox,我都无法让它工作。

我想创建这样的东西:

我现在的输出是这样的:

这是我的舞台:

 public void start(Stage stage) {
    BorderPane bp = new BorderPane();
        bp.setLeft(createLeftArea());
         bp.setRight(createRightArea());
         bp.setStyle("-fx-padding: 10 35 50 35;");
         bp.setCenter(createCenterArea());
       var scene = new Scene(new StackPane(bp), 640, 480);
      stage.setScene(scene);
     stage.getIcons().add(new Image("https://mpng.subpng.com/20180404/ebw/kisspng-java-programming-computer-programming-programming-coffee-jar-5ac598db779939.2171835915228991634899.jpg"));
     stage.setTitle("Lists");
     stage.show();
}

这是我创建按钮的地方:

public GridPane createCenterArea(){
    Button b1 = new Button("->"); 
    Button b2 = new Button("<-");
        b1.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
        b2.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
    TilePane tileButtons = new TilePane(Orientation.HORIZONTAL);
        tileButtons.setPadding(new Insets(20, 10, 20, 0));
        tileButtons.setHgap(10.0);
        tileButtons.setVgap(4.0);
        tileButtons.getChildren().addAll(b1, b2);
    GridPane gpbnt = new GridPane();
    gpbnt.add(tileButtons, 2, 0);
return gpbnt;
}

你对我做错了什么有什么想法吗?提前致谢!

我自己解决了!我使用了 VBox 和 SetAlignment 方法。

现在是这样的: https://i.stack.imgur.com/ExtaE.png

这是按钮代码:

private VBox createCenterButtons(){

  Button b1 = new Button();
  Button b2 = new Button();
  b1.setPrefSize(45, 35);
  b2.setPrefSize(45, 35);
  VBox vb = new VBox(b1,b2);
  vb.setSpacing(5.0);
  vb.setAlignment(Pos.CENTER_LEFT);
  vb.setPadding(new Insets(0, 10, 0, 10));
  return vb;
}