Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- plugins {
- id 'application'
- id 'org.openjfx.javafxplugin' version '0.0.5'
- id 'com.github.johnrengelman.shadow' version '4.0.3'
- }
- version = '1.0'
- shadowJar {
- baseName = 'shadow'
- classifier = null
- version = null
- }
- dependencies {
- compile 'org.openjfx:javafx:11.0.1'
- }
- repositories {
- mavenCentral()
- }
- javafx {
- modules = [ 'javafx.controls' ]
- }
- mainClassName = 'HelloFX'
- import javafx.application.Application;
- import javafx.scene.Scene;
- import javafx.scene.control.Label;
- import javafx.scene.layout.StackPane;
- import javafx.stage.Stage;
- public class HelloFX extends Application {
- @Override
- public void start(Stage stage) {
- String javaVersion = System.getProperty("java.version");
- String javafxVersion = System.getProperty("javafx.version");
- Label l = new Label("Hello, JavaFX " + javafxVersion + ", running on Java " + javaVersion + ".");
- Scene scene = new Scene(new StackPane(l), 640, 480);
- stage.setScene(scene);
- stage.show();
- }
- public static void main(String[] args) {
- launch();
- }
- }
Add Comment
Please, Sign In to add comment