-
Notifications
You must be signed in to change notification settings - Fork 0
/
GUI.java
36 lines (30 loc) · 1.14 KB
/
GUI.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
import javax.swing.*;
import java.awt.*;
/*
This class creates the main window holding all the other windows the app and each instance of this class runs the app.
*/
public class GUI {
public static WelcomeWindow ww ; // The welcome window displayed all along the running of the app.
public static JFrame mainFrame; // The main window holding all the others windows.
public static MapWindow mw; // The map window displayed all along the running of the app.
public static StatisticsWindow sw; // The statistics window displayed all along the running of the app.
public static AccountWindow aw; // The account window displayed all along the running of the app.
private GUI()
{
makeGUI();
}
public static void main(String[] args)
{
GUI gui = new GUI();
}
// Creates the main window and adds the initial window , account window , into it.
private void makeGUI()
{
mainFrame = new JFrame();
mainFrame.setPreferredSize(new Dimension(750,400));
aw = new AccountWindow();
mainFrame.add(aw);
mainFrame.setVisible(true);
mainFrame.pack();
}
}