/
GameGUI.java
34 lines (25 loc) · 1001 Bytes
/
GameGUI.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
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.Toolkit;
import java.net.URL;
public class GameGUI
{
// ------------------------------------------
// Constructor
// ------------------------------------------
public static void main(String [] args){
JFrame frame = new JFrame ("Wah, wah, waaaahh....");
// creates a new frame
frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); // makes a functional exit operation
JPanel pane = new JPanel(new GridBagLayout());
pane.setBackground(Color.black);
// adding the tabs which have panels to the tabbed panel
pane.add (new LostWindow());
frame.getContentPane().add(pane); // adding the pane to the frame
frame.pack(); // unpacking what we need
frame.setSize(750,450); //sets the size after unpacking
frame.setResizable(false); //frame can no longer can be resized
frame.setVisible(true); // make the frame/everything? visible
}
}