-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathJava_FX2.java
More file actions
32 lines (25 loc) · 816 Bytes
/
Java_FX2.java
File metadata and controls
32 lines (25 loc) · 816 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
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.StackPane;
import javafx.stage.Stage;
public class Java_FX2 extends Application {
// Handle User Events
Button button;
public static void main (String args[]) {
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.setTitle("Wills opening screen");
button = new Button();
button.setText("Hello Will");
StackPane layout = new StackPane();
layout.getChildren().add(button);
Scene scene = new Scene(layout, 300, 300);
primaryStage.setScene(scene);
primaryStage.show();
}
}