-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCodeCrackerGUI.java~
More file actions
58 lines (42 loc) · 1.55 KB
/
CodeCrackerGUI.java~
File metadata and controls
58 lines (42 loc) · 1.55 KB
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
48
49
50
51
52
53
54
55
56
57
58
/**
* FILE: CodeCrackerGUI.java
* AUTHORS: Clara Smith and Cali Stenson
* DATE: Dec 3 2013
* MODIFIED: Dec 3 2013
*
* CodeCrackerGUI sets up the GUI for the CodeCracker class.
*/
// import declarations
import javax.swing.JFrame;
import javax.swing.*;
import java.awt.*;
public class CodeCrackerGUI {
public static void main (String[] args) {
// creates a frame, sets default close to soft close to catch crash
JFrame frame = new JFrame("Code Cracker");
frame.setSize(new Dimension(950, 750));
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// creates an instance of CodeCracker and Levels
<<<<<<< HEAD
ContentGraph content = new ContentGraph();
CodeCracker game = new CodeCracker(content.getGameGraph());
=======
ContentGraph graph = new ContentGraph();
CodeCracker game = new CodeCracker(graph.getGameGraph());
>>>>>>> 39339f7512ab93405a331bc89f33cfc41013acfc
// creates panels
CodeCrackerAboutPanel aboutPanel = new CodeCrackerAboutPanel();
CodeCrackerInstructionsPanel instructionsPanel = new CodeCrackerInstructionsPanel();
CodeCrackerGamePanel gamePanel = new CodeCrackerGamePanel(game, content);
// creates tabbed pane
// adds tabbed panels to frame
JTabbedPane codecracker = new JTabbedPane();
codecracker.addTab("About", aboutPanel);
codecracker.addTab("Instructions", instructionsPanel);
codecracker.addTab("Game", gamePanel);
// misc
frame.getContentPane().add(codecracker);
frame.pack();
frame.setVisible(true);
}
}