diff --git a/pom.xml b/pom.xml
index ae435b3..ed7c37e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,6 +7,11 @@
Projet de fin d'année de L3
src
+
+
+ src/launcher/ui
+
+
maven-compiler-plugin
diff --git a/src/launcher/Launcher.java b/src/launcher/Launcher.java
index 5710657..cb88124 100644
--- a/src/launcher/Launcher.java
+++ b/src/launcher/Launcher.java
@@ -9,8 +9,6 @@
package launcher;
-import java.io.FileInputStream;
-
import javafx.application.Application;
import javafx.scene.Parent;
import javafx.scene.Scene;
@@ -19,16 +17,19 @@ import javafx.fxml.*;
public class Launcher extends Application {
+ /*
+ * Start method is used by Launcher as an implementation of the Application class to create a JavaFX thread to display the GUI window
+ */
public void start(Stage primaryStage) throws Exception {
- FileInputStream r_launcher = new FileInputStream("ui/launcher.fxml");
- FXMLLoader floader = new FXMLLoader();
- Parent root = floader.load(r_launcher);
- Scene main = root.getScene();
+
+ Parent root = FXMLLoader.load(getClass().getResource("ui/launcher.fxml"));
+
+ Scene main = new Scene(root);
primaryStage.setTitle("Boulevard Combattant");
-
primaryStage.setScene(main);
primaryStage.show();
+
}
}
diff --git a/ui/launcher.fxml b/src/launcher/ui/launcher.fxml
similarity index 100%
rename from ui/launcher.fxml
rename to src/launcher/ui/launcher.fxml