Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package fxdemo1;
- import javafx.application.Application;
- import javafx.scene.Scene;
- import javafx.scene.layout.FlowPane;
- import javafx.stage.Stage;
- public class FXDemo1 extends Application {
- //
- public static void main(String[] args) {
- // TODO code application logic here
- launch(args);
- }
- @Override
- public void start(Stage stage) throws Exception {
- System.out.println("FXDemo1.start>>");
- String javaVersion = System.getProperty("java.version");
- String javafxVersion = System.getProperty("javafx.version");
- //
- System.out.println("javaVersion=" + javaVersion); // JAVA 11 >
- System.out.println("javafxVersion=" + javafxVersion); // JAVAFX14 >
- // создаем корневой узел - используем панель поточной компоновки
- FlowPane pane = new FlowPane();
- // создаем сцену (объект типа Scene)
- Scene scene = new Scene(pane, 800, 600);
- // заголовок окна (подмостка)
- stage.setTitle("JavaFX FXDemo1");
- //
- stage.setScene(scene);
- // показ окна на экране
- stage.show();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement