From f41c073b4167838bc801db51caccfc66af36f21e Mon Sep 17 00:00:00 2001 From: Mat Date: Mon, 1 May 2023 12:31:27 +0200 Subject: [PATCH] Make a package for all the Menu class --- app/src/main/java/school_project/Controller.java | 2 -- .../main/java/school_project/{ => Menu}/MenuAcceuil.java | 2 +- .../java/school_project/{ => Menu}/MenuLevelDay1.java | 4 ++-- app/src/main/java/school_project/Menu/MenuLevelDay2.java | 9 +++++++++ 4 files changed, 12 insertions(+), 5 deletions(-) rename app/src/main/java/school_project/{ => Menu}/MenuAcceuil.java (97%) rename app/src/main/java/school_project/{ => Menu}/MenuLevelDay1.java (97%) create mode 100644 app/src/main/java/school_project/Menu/MenuLevelDay2.java diff --git a/app/src/main/java/school_project/Controller.java b/app/src/main/java/school_project/Controller.java index 0eb92d9..5635eba 100644 --- a/app/src/main/java/school_project/Controller.java +++ b/app/src/main/java/school_project/Controller.java @@ -25,8 +25,6 @@ public class Controller extends Application { //set up the page stage = primaryStage; stage.setTitle("ROAD TO MASTER YOU"); - - stage.setScene(MenuAcceuil); stage.show(); } diff --git a/app/src/main/java/school_project/MenuAcceuil.java b/app/src/main/java/school_project/Menu/MenuAcceuil.java similarity index 97% rename from app/src/main/java/school_project/MenuAcceuil.java rename to app/src/main/java/school_project/Menu/MenuAcceuil.java index d93f68c..c88c66a 100644 --- a/app/src/main/java/school_project/MenuAcceuil.java +++ b/app/src/main/java/school_project/Menu/MenuAcceuil.java @@ -1,4 +1,4 @@ -package school_project; +package school_project.Menu; import javafx.geometry.Insets; import javafx.geometry.Pos; diff --git a/app/src/main/java/school_project/MenuLevelDay1.java b/app/src/main/java/school_project/Menu/MenuLevelDay1.java similarity index 97% rename from app/src/main/java/school_project/MenuLevelDay1.java rename to app/src/main/java/school_project/Menu/MenuLevelDay1.java index 1a08e80..c5f69ed 100644 --- a/app/src/main/java/school_project/MenuLevelDay1.java +++ b/app/src/main/java/school_project/Menu/MenuLevelDay1.java @@ -1,4 +1,4 @@ -package school_project; +package school_project.Menu; import javafx.geometry.HPos; import javafx.geometry.Insets; @@ -21,7 +21,7 @@ public class MenuLevelDay1 extends GridPane { GdP = new GridPane(); //add all the button for level for (Button c : Level_button) - c = new Button(); + c = new Button((String(c+1))); Level_button[0] = new Button("1"); Level_button[1] = new Button("2"); diff --git a/app/src/main/java/school_project/Menu/MenuLevelDay2.java b/app/src/main/java/school_project/Menu/MenuLevelDay2.java new file mode 100644 index 0000000..3065c3d --- /dev/null +++ b/app/src/main/java/school_project/Menu/MenuLevelDay2.java @@ -0,0 +1,9 @@ +package school_project.Menu; + +import school_project.Menu.MenuLevelDay1; + +public class MenuLevelDay2 extends MenuLevelDay1 { + public MenuLevelDay2(){ + super(); + } +}