-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApps.java
53 lines (47 loc) · 1.13 KB
/
Apps.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
50
51
52
53
/****************************************************
* TCP2201 Project *
* Group Members: 1. Muhammad Asyraf bin Ibrahim *
* 2. Khairul Azmi *
* 3. Sakinah binti Burhan *
* 4. Kamil Pervaiz *
*****************************************************/
import java.io.*;
import java.awt.*;
import javax.swing.*;
public class Apps
{
private MainFrame mFrame = new MainFrame();
public Apps()
{
System.out.println("Apps initialized!");
run();
}
public void run()
{
while(true)
{
if(!mFrame.isVisible())
{
LoginDialog loginPrompt = new LoginDialog(mFrame);
mFrame = new MainFrame("Online MMU-Board System", loginPrompt.acquireUser());
}
System.out.print("");
}
}
public static void main(String[] args)
{
try
{
Apps myApps = new Apps();
}
catch(Exception e)
{
StringWriter errors = new StringWriter();
e.printStackTrace(new PrintWriter(errors));
JOptionPane.showMessageDialog(new JFrame(), errors.toString(), "Error!", JOptionPane.ERROR_MESSAGE);
System.out.println(errors.toString());
System.out.println("Apps destroyed!");
System.exit(0);
}
}
}