You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
831 B

4 years ago
  1. package de.fd.fh;
  2. import javafx.application.Application;
  3. import javafx.application.Platform;
  4. import javafx.scene.Scene;
  5. import javafx.scene.control.Button;
  6. import javafx.scene.layout.Pane;
  7. import javafx.scene.layout.StackPane;
  8. import javafx.stage.Stage;
  9. public class ClientApp extends Application
  10. {
  11. public static void main(String... args)
  12. {
  13. System.out.println("Hallo Welt!");
  14. launch(args);
  15. }
  16. @Override
  17. public void start(Stage primaryStage)
  18. {
  19. primaryStage.setTitle("Hello JavaFX!");
  20. Button btn = new Button();
  21. btn.setText("Hello JavaFX!");
  22. btn.setOnAction( (event) -> Platform.exit() );
  23. Pane root = new StackPane();
  24. root.getChildren().add(btn);
  25. primaryStage.setScene(new Scene(root, 300, 150));
  26. primaryStage.show();
  27. }
  28. }