I made a simple game and when it ends it'll display a new Stage
with some information:
public static void d(String m){
Stage stage = new Stage();
stage.setTitle("GAME FINISHED");
Label label = new Label(m);
label.setTextFill(Color.PURPLE);
label.setFont(new Font("Cambria",14));
Button button = new Button("Close");
VBox vb = new VBox();
button.setOnAction(e-> p.close());
vb.getChildren().addAll(label,button);
vb.setSpacing(50);
vb.setPadding(new Insets(5,0,0,12));
Scene scene = new Scene(v,200,300);
stage.setScene(scene);
stage.setResizable(false);
stage.showAndWait();
}
I don't want this window to show in the middle of the screen because it hides some content of the game. Is it possible to display a stage not in the middle of the screen?