How do I create a Pane and have a child Node
put at the center?
Lets say the Pane
is 500
by 500
and the Node
is an ImageView
with a 200
by 200
Image
ImageView view = new ImageView();
Image img = new Image("test.png");
view.setImage(img);
Pane pane = new Pane();
pane.setMinWidth(500);
pane.setMinHeight(500);
pane.getChildren().add(view);