diff --git a/.gitignore b/.gitignore index 9154f4c..b958db5 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,7 @@ hs_err_pid* replay_pid* +.vscode/ + +target/ + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..3c63a04 --- /dev/null +++ b/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + net.metaunix + acorn + 0.1.0 + + UTF-8 + 17 + 17 + + + + org.openjfx + javafx-controls + 17 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.0 + + 17 + + + + org.openjfx + javafx-maven-plugin + 0.0.6 + + + + + default-cli + + net.metaunix.App + + + + + + + diff --git a/src/main/java/net/metaunix/App.java b/src/main/java/net/metaunix/App.java new file mode 100644 index 0000000..53e512a --- /dev/null +++ b/src/main/java/net/metaunix/App.java @@ -0,0 +1,30 @@ +package net.metaunix; + +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.control.Label; +import javafx.scene.layout.StackPane; +import javafx.stage.Stage; + + +/** + * JavaFX App + */ +public class App extends Application { + + @Override + public void start(Stage stage) { + var javaVersion = SystemInfo.javaVersion(); + var javafxVersion = SystemInfo.javafxVersion(); + + var label = new Label("Hello, JavaFX " + javafxVersion + ", running on Java " + javaVersion + "."); + var scene = new Scene(new StackPane(label), 640, 480); + stage.setScene(scene); + stage.show(); + } + + public static void main(String[] args) { + launch(); + } + +} \ No newline at end of file diff --git a/src/main/java/net/metaunix/SystemInfo.java b/src/main/java/net/metaunix/SystemInfo.java new file mode 100644 index 0000000..db181fe --- /dev/null +++ b/src/main/java/net/metaunix/SystemInfo.java @@ -0,0 +1,13 @@ +package net.metaunix; + +public class SystemInfo { + + public static String javaVersion() { + return System.getProperty("java.version"); + } + + public static String javafxVersion() { + return System.getProperty("javafx.version"); + } + +} \ No newline at end of file diff --git a/src/main/resources/views/main.fxml b/src/main/resources/views/main.fxml new file mode 100644 index 0000000..1d209bc --- /dev/null +++ b/src/main/resources/views/main.fxml @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +