-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathATMMain.java
More file actions
30 lines (27 loc) · 1.04 KB
/
ATMMain.java
File metadata and controls
30 lines (27 loc) · 1.04 KB
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
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
/**
* Main class that starts the ATM Simulation application.
*/
public class ATMMain {
public static void main(String[] args) {
System.out.println("Hello World! Starting ATM Simulation...");
// Set system look and feel
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException |
IllegalAccessException | UnsupportedLookAndFeelException e) {
System.out.println("Error setting look and feel: " + e.getMessage());
}
// Launch GUI safely on the Event Dispatch Thread
SwingUtilities.invokeLater(new Runnable() {
public void run() {
LoginScreen login = new LoginScreen();
login.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
login.setVisible(true);
}
});
}
}