forked from denhamd17/ProjectMinesweeper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEndScreen.java
More file actions
33 lines (27 loc) · 771 Bytes
/
Copy pathEndScreen.java
File metadata and controls
33 lines (27 loc) · 771 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
33
package minesweeper;
import java.awt.*;
public class EndScreen extends EasyApp {
Label message = addLabel("", 25, 25, 150, 50, this);
Button back = addButton("Back", 75, 100, 50, 50, this);
public EndScreen(boolean check) {
setTitle("Minesweeper");
setBounds(0, 0, 200, 200);
this.setResizable(false);
this.setLocationRelativeTo(null);
back.setBackground(new Color(0, 153, 204));
back.setForeground(Color.BLACK);
message.setFont(new Font("Arial", 0, 24));
message.setForeground(Color.BLACK);
if(!check) {
message.setText("You Lost!");
} else {
message.setText("You Won!");
}
}
public void actions (Object source, String command) {
if (source == back) {
new Start();
dispose();
}
}
}