/***package com.example.demo;

import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.GridPane;
import javafx.stage.Stage;

import static javafx.application.Application.launch;

public class SelectLevel extends Stage {
    private Stage stage;
    //set up scene one
    private Scene Menu;
    private BorderPane BdP;

    private Label title;
    private Button Play;
    private Button Select_level;
    private Button Trophy;
    //set up scene 2
    private Scene Level_menu;
    private GridPane GdP;
    private Button bck_menu;

    public void start(Stage primaryStage) {
        //set up the page
        primaryStage.setTitle("Select your Level");
        Menu = createMenu();
        Level_menu = createLevel_menu();

        primaryStage.setScene(Menu);
        primaryStage.show();

    }
    private Scene createMenu(){
        Play = new Button("Play");
        Trophy = new Button("Trophy");
        Select_level = new Button("Select Level");
        Select_level.setOnAction(event -> switchScenes(Level_menu));
        title = new Label("Welcome to road to master you");
        BdP = new BorderPane(null,title,Select_level,Trophy,Play);
        Menu = new Scene(BdP,700,400);

        return Menu;
    }
    private Scene createLevel_menu(){
        bck_menu = new Button("Back to the menu");
        bck_menu.setOnAction(event -> switchScenes(Menu));
        GdP = new GridPane();
        Level_menu = new Scene(GdP,700,400);

        return Level_menu;
    }
    public void switchScenes(Scene scene){
        stage.setScene(scene);

    }
    public static void main(String[] args) {
        launch(args);
    }
}
***/