-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnd.java
More file actions
61 lines (48 loc) · 1.7 KB
/
End.java
File metadata and controls
61 lines (48 loc) · 1.7 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.scene.layout.VBox;
import javafx.stage.Modality;
import javafx.stage.Stage;
import java.io.IOException;
public class End {
static boolean answer ;
//private static Scoreboard myscore ;
public static void display(int Score, Stage stage){
//myscore = Scoreboard.deserialize() ;
Stage Window = new Stage() ;
Window.setTitle("Submit Score");
Window.initModality(Modality.APPLICATION_MODAL);
Window.setTitle("Submit Score");
Window.setMinWidth(250);
Label label = new Label();
label.setText("Enter Your Name") ;
Button yesButton = new Button("Submit") ;
Button noButton = new Button("Don't Submit") ;
TextField nameInput = new TextField();
Button button = new Button("Click Me") ;
yesButton.setOnAction(e -> {
try {
}
catch (Exception e3) {
}
Window.close();
return;
});
noButton.setOnAction(e -> {
Window.close();
return;
});
//Layout
VBox layout = new VBox(10);
layout.setPadding(new Insets(10));
layout.getChildren().addAll(nameInput, yesButton,noButton) ;
Scene scene = new Scene(layout, 300,250) ;
Window.setScene(scene);
Window.show() ;
}
}