change the switchRoot method
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is passing

This commit is contained in:
Mat 2023-05-09 12:56:33 +02:00
parent a043cb487f
commit af3489d078

View File

@ -24,14 +24,15 @@ public class Controller extends Application {
root = new MenuAcceuil(); root = new MenuAcceuil();
stage = primaryStage; stage = primaryStage;
stage.setTitle("ROAD TO MASTER"); stage.setTitle("ROAD TO MASTER");
stage.setScene(new Scene(root)); switchRoot(root);
stage.show(); stage.show();
} }
public static void switchRoot(Parent root){ public static void switchRoot(Parent root){
stage.setScene(new Scene(root)); Scene scene = new Scene(root);
stage.setScene(scene);
} }
public static void main(String[] args) { public static void main(String[] args) {
launch(); launch();