Created
September 24, 2020 05:26
-
-
Save brunoborges/5b603be4496dcd8e039cb8e1b9350b13 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//DEPS org.openjfx:javafx-controls:11.0.2:${os.detected.jfxname} | |
//DEPS org.openjfx:javafx-graphics:11.0.2:${os.detected.jfxname} | |
import javafx.application.Application; | |
import javafx.scene.Scene; | |
import javafx.scene.control.Label; | |
import javafx.scene.layout.StackPane; | |
import javafx.stage.Stage; | |
public class hello extends Application { | |
@Override | |
public void start(Stage stage) { | |
var javaVersion = System.getProperty("java.version"); | |
var javafxVersion = System.getProperty("javafx.version"); | |
var message = "Hello, JavaFX %s, running on Java %s."; | |
var label = new Label(String.format(message, javafxVersion, javaVersion)); | |
var scene = new Scene(new StackPane(label), 640, 480); | |
stage.setScene(scene); | |
stage.show(); | |
} | |
public static void main(String[] args) { | |
launch(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment