commit 9b2fa74d26849b9791ff5269a0a18692e7a3dae6 Author: Salatiel Genol Date: Wed Feb 7 17:07:26 2024 +0100 Primer commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/nbactions.xml b/nbactions.xml new file mode 100644 index 0000000..58b63cb --- /dev/null +++ b/nbactions.xml @@ -0,0 +1,13 @@ + + + + run + + jar + + + clean + javafx:run + + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..1bc51de --- /dev/null +++ b/pom.xml @@ -0,0 +1,55 @@ + + + 4.0.0 + simple.javafx.project + simpleJavaFXProject + 1.0-SNAPSHOT + jar + + UTF-8 + 17 + 17 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.12.1 + + ${maven.compiler.source} + ${maven.compiler.target} + + + + org.openjfx + javafx-maven-plugin + 0.0.8 + + + main/main.App + + + + + default-cli + + + + + + + + + org.openjfx + javafx-controls + 17.0.10 + + + org.openjfx + javafx-fxml + 17.0.10 + + + \ No newline at end of file diff --git a/src/main/java/main/App.java b/src/main/java/main/App.java new file mode 100644 index 0000000..98af64b --- /dev/null +++ b/src/main/java/main/App.java @@ -0,0 +1,25 @@ +package main; + +import java.io.IOException; +import javafx.application.Application; +import javafx.fxml.FXMLLoader; +import javafx.scene.Parent; +import javafx.scene.Scene; +import javafx.stage.Stage; + +public class App extends Application{ + + public static void main(String[] args) { + launch(); + } + + @Override + public void start(Stage stage) throws IOException { + Parent root = FXMLLoader.load(App.class.getResource("FXMLDocument.fxml")); + + Scene scene = new Scene(root); + + stage.setScene(scene); + stage.show(); + } +} diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java new file mode 100644 index 0000000..d60a05e --- /dev/null +++ b/src/main/java/module-info.java @@ -0,0 +1,7 @@ +module main { + requires javafx.controls; + requires javafx.fxml; + + opens main to javafx.fxml; + exports main; +} diff --git a/src/main/resources/main/FXMLDocument.fxml b/src/main/resources/main/FXMLDocument.fxml new file mode 100644 index 0000000..18ac1b3 --- /dev/null +++ b/src/main/resources/main/FXMLDocument.fxml @@ -0,0 +1,11 @@ + + + + + + + + + + +