-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFirstExample.java
More file actions
32 lines (23 loc) · 823 Bytes
/
FirstExample.java
File metadata and controls
32 lines (23 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package sample;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.*;
import javafx.stage.Stage;
public class FirstExample extends Application {
Stage the_current_window;
Button my_button;
@Override
public void start(Stage primaryStage) {
the_current_window = primaryStage;
the_current_window.setTitle("First example");
my_button = new Button("click here");
StackPane the_layout = new StackPane();
the_layout.getChildren().add(my_button);
Scene scene = new Scene(the_layout, 200, 200);
the_current_window.setScene(scene);
the_current_window.show();
}
}