forked from mcyapan/CSCI205Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSceneFrame.java
More file actions
33 lines (27 loc) · 766 Bytes
/
SceneFrame.java
File metadata and controls
33 lines (27 loc) · 766 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
// idea: put button to switch maps
import javax.swing.*;
public class SceneFrame {
private JFrame frame;
private int width;
private int height;
private SceneCanvas sc;
public SceneFrame() {
frame = new JFrame();
width = 800;
height = 600;
sc = new SceneCanvas();
}
public void setUpGUI() {
frame.setResizable(false);
frame.setSize(width, height);
frame.setTitle("Project 1 - Deekimcheng - Yapan");
frame.add(sc);
frame.pack();
frame.setResizable(false);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
sc.setUpGame();
sc.startGameThread();
}
}