forked from jarolrod/java-solitaire
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAboutWindow.java
More file actions
32 lines (25 loc) · 745 Bytes
/
AboutWindow.java
File metadata and controls
32 lines (25 loc) · 745 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 GUI;
import javafx.stage.*;
import javafx.scene.*;
import javafx.scene.layout.*;
import javafx.scene.control.*;
import javafx.geometry.*;
public class AboutWindow {
public static void display() {
Stage aboutWindow = new Stage();
aboutWindow.initModality(Modality.APPLICATION_MODAL);
aboutWindow.setTitle("About");
aboutWindow.setMinWidth(300);
Label messageLabel = new Label("Hello");
Button close = new Button("close");
close.setOnAction(e -> {
aboutWindow.close();
});
VBox layout = new VBox(10);
layout.getChildren().addAll(messageLabel, close);
layout.setAlignment(Pos.CENTER);
Scene confirmScene = new Scene(layout);
aboutWindow.setScene(confirmScene);
aboutWindow.showAndWait();
}
}