5. public class Hello extends Application {
@Override
public void start(Stage stage) {
// コンテナ
Group container = new Group();
// Scene Graph のルートを生成し、コンテナを貼る
Scene scene = new Scene(container, 100, 20);
stage.setScene(scene);
// ラベルを生成しコンテナに貼る
Label label = new Label("Hello, World!");
container.getChildren().add(label);
}
stage.show(); SceneGraph
public static void main(String[] args) {
Application.launch(args);
}
} アプリケーションスレッドの起動