-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindow.java
More file actions
35 lines (26 loc) · 771 Bytes
/
Copy pathWindow.java
File metadata and controls
35 lines (26 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
34
35
import javax.swing.*;
import javax.swing.border.LineBorder;
import javax.imageio.ImageIO;
import java.io.File;
import java.io.IOException;
import java.awt.image.BufferedImage;
import java.awt.*;
import java.awt.event.*;
public class Window extends JFrame {
private Board board;
public Window(){
super("CROSSY ROADS");
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
setLayout(new BorderLayout(1,1));
board = new Board();
addKeyListener(board);
add(board);
setMinimumSize(new Dimension(1000,700));
pack();
setFocusable(true);
setVisible(true);
}
public static void main(String[] args){
new Window();
}
}