-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathResult.java
47 lines (39 loc) · 1.15 KB
/
Result.java
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
package Othello;
import java.awt.BorderLayout;
import java.awt.Font;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.border.Border;
public class Result {
Font font;
Result(int status)
{
String str="";
if(status ==1)
str="PLAYER WHITE WON";
else if(status ==2)
str="PLAYER BLACK WON";
else if(status==3)
str="DRAW";
JFrame j=new JFrame("The End");
j.setBounds(200,200,500,430);
j.setResizable(false);
j.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JLabel jl1=new JLabel("Game Status: "+str);
JLabel jl=new JLabel("");
jl.setBounds(210, 200,490,420);
font = new Font("Times new Roman", Font.BOLD, 20);
jl1.setFont(font);
Icon end=new ImageIcon(Board.class.getResource("/images/dancing gif2.gif"));
jl.setIcon(end);
j.add(jl1,BorderLayout.NORTH);
//j.add(Board.newGame,BorderLayout.SOUTH);
//Board.newGame.addMouseListener(new MyMouseEvent());
j.add(jl,BorderLayout.CENTER);
j.setVisible(true);
}
}