Created
June 25, 2013 23:44
-
-
Save KowalczykBartek/5863518 to your computer and use it in GitHub Desktop.
standard fx's body
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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