forked from IceDemonZero/CS2212-Team-54
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.java
42 lines (33 loc) · 1.06 KB
/
Main.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
import gui.GenericUI;
import gui.LoginWindow;
import gui.MainUI;
import infrastructure.*;
import javax.swing.*;
import java.util.ArrayList;
public class Main {
/*private static void showMainUI() {
MainUI ui = MainUI.getInstance();
ArrayList<Trader> traderList = new ArrayList<Trader>();
ui.setTraderList(traderList);
ui.setExtendedState(JFrame.MAXIMIZED_BOTH);
ui.setVisible(true);
}*/
public static void main(String[] args) {
Authenticator auth = new Authenticator("pw.txt");
GenericUI proxy = new LoginWindow(auth);
proxy.setVisible(true);
proxy.addWindowListener(new java.awt.event.WindowAdapter() {
@Override
public void windowClosed(java.awt.event.WindowEvent windowEvent) {
if (auth.isLoggedIn()) {
System.out.println("hi");
//showMainUI();
proxy.request();
}
else {
System.exit(0);
}
}
});
}
}