package de.fd.fh; import javafx.application.Application; import javafx.application.Platform; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.layout.Pane; import javafx.scene.layout.StackPane; import javafx.stage.Stage; public class ClientApp extends Application { public static void main(String... args) { System.out.println("Hallo Welt!"); launch(args); } @Override public void start(Stage primaryStage) { primaryStage.setTitle("Hello JavaFX!"); Button btn = new Button(); btn.setText("Hello JavaFX!"); btn.setOnAction( (event) -> Platform.exit() ); Pane root = new StackPane(); root.getChildren().add(btn); primaryStage.setScene(new Scene(root, 300, 150)); primaryStage.show(); } }