From 1cc6a03e289a55822adba6495d99b57cc3893c51 Mon Sep 17 00:00:00 2001 From: Frantatita Date: Thu, 14 Mar 2024 09:42:50 -0600 Subject: [PATCH] Primero --- nbactions.xml | 40 ++++++++++ pom.xml | 78 +++++++++++++++++++ .../com/mycompany/presentadorjavafx/App.java | 30 +++++++ .../presentadorjavafx/SystemInfo.java | 13 ++++ src/main/java/module-info.java | 4 + 5 files changed, 165 insertions(+) create mode 100644 nbactions.xml create mode 100644 pom.xml create mode 100644 src/main/java/com/mycompany/presentadorjavafx/App.java create mode 100644 src/main/java/com/mycompany/presentadorjavafx/SystemInfo.java create mode 100644 src/main/java/module-info.java diff --git a/nbactions.xml b/nbactions.xml new file mode 100644 index 0000000..a0cb38e --- /dev/null +++ b/nbactions.xml @@ -0,0 +1,40 @@ + + + + run + + jar + + + clean + javafx:run + + + + debug + + clean + javafx:run@ide-debug + + + true + + + + profile + + clean + javafx:run@ide-profile + + + + CUSTOM-jlink + jlink + + clean + + compile + javafx:jlink + + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..daa77c9 --- /dev/null +++ b/pom.xml @@ -0,0 +1,78 @@ + + 4.0.0 + com.mycompany + PresentadorJavaFX + 1.0-SNAPSHOT + + UTF-8 + 11 + 11 + + + + org.openjfx + javafx-controls + 13 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.0 + + 11 + + + + org.openjfx + javafx-maven-plugin + 0.0.4 + + com.mycompany.presentadorjavafx.App + + + + + + default-cli + + + + + debug + + + + + + + + + ide-debug + + + + + + + + + ide-profile + + + + + + + + + + + + + + + diff --git a/src/main/java/com/mycompany/presentadorjavafx/App.java b/src/main/java/com/mycompany/presentadorjavafx/App.java new file mode 100644 index 0000000..32f0f85 --- /dev/null +++ b/src/main/java/com/mycompany/presentadorjavafx/App.java @@ -0,0 +1,30 @@ +package com.mycompany.presentadorjavafx; + +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/com/mycompany/presentadorjavafx/SystemInfo.java b/src/main/java/com/mycompany/presentadorjavafx/SystemInfo.java new file mode 100644 index 0000000..f0c45cf --- /dev/null +++ b/src/main/java/com/mycompany/presentadorjavafx/SystemInfo.java @@ -0,0 +1,13 @@ +package com.mycompany.presentadorjavafx; + +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/java/module-info.java b/src/main/java/module-info.java new file mode 100644 index 0000000..b894bbf --- /dev/null +++ b/src/main/java/module-info.java @@ -0,0 +1,4 @@ +module com.mycompany.presentadorjavafx { + requires javafx.controls; + exports com.mycompany.presentadorjavafx; +}