All Classes Namespaces Files Functions Variables
HelloWorld.java
Go to the documentation of this file.
1 package hello.simple;
2 import javafx.application.Application;
3 import javafx.scene.Scene;
4 import javafx.scene.control.Label;
5 import javafx.scene.layout.BorderPane;
6 import javafx.stage.Stage;
7 
8 /**
9  * Yksinkertainen esimerkki JavaFX ohjelmasta
10  * @author vesal
11  * @version 4.3.2016
12  */
13 public class HelloWorld extends Application {
14  @Override
15  public void start(Stage primaryStage) {
16  BorderPane root = new BorderPane();
17  Label label = new Label("Hello World!");
18  root.setCenter(label);
19  Scene scene = new Scene(root);
20  primaryStage.setScene(scene);
21  primaryStage.show();
22  }
23 
24 
25  /** @param args ei käytössä */
26  public static void main(String[] args) {
27  launch(args);
28  }
29 }