]> Git Server - tankstelle.git/commitdiff
moved main method into Main.java
authorRobin Cheney <cheneyr@eternal.ddnss.de>
Fri, 28 Nov 2025 08:52:42 +0000 (09:52 +0100)
committerRobin Cheney <cheneyr@eternal.ddnss.de>
Fri, 28 Nov 2025 08:52:42 +0000 (09:52 +0100)
.gitignore
src/main/java/de/diejungsvondertanke/tankstelle/Main.java
src/main/java/de/diejungsvondertanke/tankstelle/ui/JFX.java

index 72013b73558f3feca6d9156898a38e61c71b7a49..789f0036842cd9d737142d1babd300ce1bb5707d 100644 (file)
@@ -6,3 +6,4 @@ target/maven-archiver/pom.properties
 .vscode/settings.json
 target/*
 src/main/java/de/diejungsvondertanke/tankstelle/Test.java
+src/main/java/docs.sh
index 5bc3264d5de218989ce24e26e8c5ad0413fdd475..fe94c3ca8ab076cfbc7dc89fba494fb7299fa80e 100644 (file)
@@ -7,6 +7,7 @@ import java.util.ArrayList;
 import java.util.Arrays;
 
 import de.diejungsvondertanke.tankstelle.error.NoSuchFuelTypeError;
+import de.diejungsvondertanke.tankstelle.ui.JFX;
 
 /**
  * Main Class
@@ -32,6 +33,16 @@ public class Main {
      */
     public static ArrayList<FuelStation> fuelStations = new ArrayList<FuelStation>(Arrays.asList(initialFuelStations));
 
+    /**
+     * Launch GUI
+     * 
+     * @param args Program arguments from additionally passed parameters. Mandatory,
+     *             but never used here.
+     */
+    public static void main(String[] args) {
+        JFX.launch(args);
+    }
+
     /**
      * Get an array of fuel stations which have a number of vending machines
      * that is equal to {@code number_of_vending_machines}
index bc7469fa1ef32ebbc39a71c17f977da6ab1da3e1..0a1cf8aa3a795d3446201d3616454f91f1681892 100644 (file)
@@ -33,10 +33,6 @@ public class JFX extends Application {
         stage.show();
     }
 
-    public static void main(String[] args) {
-        launch(args);
-    }
-
     private static Parent loadFXML(String fxml) throws IOException {
         FXMLLoader fxmlLoader = new FXMLLoader(JFX.class.getResource("/ui/" + fxml + ".fxml"));
         parent = fxmlLoader.load();