-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAlertClass.java
More file actions
31 lines (25 loc) · 823 Bytes
/
AlertClass.java
File metadata and controls
31 lines (25 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
package AnalyzerPackage;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.layout.VBox;
import javafx.stage.*;
import javafx.scene.control.*;
// This class just contains the layout and the dimensions of the alert message.
public class AlertClass {
private Stage stage;
public void display(String title, String msg){
stage = new Stage();
stage.initModality(Modality.APPLICATION_MODAL);
stage.setTitle(title);
stage.setMinWidth(400);
stage.setMinHeight(100);
Label label=new Label();
label.setText(msg);
VBox layout=new VBox(50);
layout.getChildren().addAll(label);
layout.setAlignment(Pos.CENTER);
Scene scene=new Scene(layout);
stage.setScene(scene);
stage.showAndWait();
}
}