how to center a gridpane in javafx code example
Example: javafx center node in gridpane
//center grid pane:
GridPane pane = new GridPane();
pane.setAlignment(Pos.CENTER);
//center element:
GridPane.setHalignment(node, HPos.CENTER);
GridPane.setValignment(node, VPos.CENTER);