Advertisement
Guest User

Untitled

a guest
Mar 28th, 2020
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.46 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package fxdemo1;
  7.  
  8. import javafx.application.Application;
  9. import javafx.scene.Scene;
  10. import javafx.scene.layout.FlowPane;
  11. import javafx.stage.Stage;
  12.  
  13. public class FXDemo1 extends Application {
  14.  
  15.     //
  16.     public static void main(String[] args) {
  17.         // TODO code application logic here
  18.         launch(args);
  19.     }
  20.    
  21.     @Override
  22.     public void start(Stage stage) throws Exception {
  23.         System.out.println("FXDemo1.start>>");
  24.         String javaVersion   = System.getProperty("java.version");
  25.         String javafxVersion = System.getProperty("javafx.version");
  26.         //
  27.         System.out.println("javaVersion=" + javaVersion);       // JAVA  11 >
  28.         System.out.println("javafxVersion=" + javafxVersion);   // JAVAFX14 >
  29.         // создаем корневой узел - используем панель поточной компоновки
  30.         FlowPane pane = new FlowPane();
  31.         // создаем сцену (объект типа Scene)
  32.         Scene scene = new Scene(pane, 800, 600);          
  33.         // заголовок окна (подмостка)
  34.         stage.setTitle("JavaFX FXDemo1");
  35.         //
  36.         stage.setScene(scene);
  37.         // показ окна на экране
  38.         stage.show();
  39.     }    
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement