Skip to content

Instantly share code, notes, and snippets.

@KowalczykBartek
Created June 25, 2013 23:44
Show Gist options
  • Save KowalczykBartek/5863518 to your computer and use it in GitHub Desktop.
Save KowalczykBartek/5863518 to your computer and use it in GitHub Desktop.
standard fx's body
@Override
public void start(Stage primaryStage) {
Button btn = new Button();
btn.setText("Say 'Hello World'");
btn.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
System.out.println("Hello World!");
}
});
StackPane root = new StackPane();
root.getChildren().add(btn);
Scene scene = new Scene(root, 300, 250);
primaryStage.setTitle("Hello World!");
primaryStage.setScene(scene);
primaryStage.show();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment