-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindow.java
More file actions
24 lines (22 loc) · 725 Bytes
/
Copy pathWindow.java
File metadata and controls
24 lines (22 loc) · 725 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
import javax.swing.JFrame;
public class Window extends JFrame {
public static final int SCREEN_WIDTH = 1920;
public Window() {
super("Angie's bird game!");
setSize(SCREEN_WIDTH, 400);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setResizable(false);
display = new Display();
addKeyListener(display);
add(display);
}
public void startGame(){
display.startGame();
}
private Display display;
public static void main(String args[]) {
Window gameWindow = new Window();
gameWindow.setVisible(true);
gameWindow.startGame();
}
}