-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRubrusMain.java
51 lines (42 loc) · 1.29 KB
/
RubrusMain.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
48
49
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.applet.*;
import javax.swing.event.*;
import java.net.*;
/** The RubrusMain class - creates the JFrame for the Rubrus Game
* Plays a superb game of Rubrus using RubrusBoard class
* @author Tristan Amini, Victor Cong, Chen Chou
* @version January 23, 2012
*/
public class RubrusMain extends JFrame
{
// Program variables for the game board
private RubrusBoard gameBoard;
/** Constructs a new RubrusMain frame (sets up the Game)
*/
public RubrusMain ()
{
// Sets up the frame for the game
super ("Rubrus");
setResizable (false);
setUndecorated (true);
// Load up the icon image
setIconImage (Toolkit.getDefaultToolkit ().getImage ("Square.png"));
// Sets up the Rubrus board that plays the game
// and add it to the centre of this frame
gameBoard = new RubrusBoard ();
getContentPane ().add (gameBoard, BorderLayout.CENTER);
} // Constructor
/** Starts up the RubrusMain frame
* @param args An array of Strings (ignored)
*/
public static void main (String[] args)
{
// Starts up the RubrusMain frame
RubrusMain frame = new RubrusMain ();
frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
frame.pack ();
frame.setVisible (true);
} // main method
}