-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRaheelMain.java
More file actions
30 lines (24 loc) · 911 Bytes
/
Copy pathRaheelMain.java
File metadata and controls
30 lines (24 loc) · 911 Bytes
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 java.awt.EventQueue;
import javax.swing.UIManager;
public class RaheelMain {
public static void main(String[] args) {
Bank bopSystem = StorageManager.loadBankData();
syncSystemCounters(bopSystem);
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
// Fallback to default if system theme is unavailable
}
EventQueue.invokeLater(() -> {
new RaheelGUI(bopSystem);
});
}
private static void syncSystemCounters(Bank bank) {
if (bank.getClients() != null && !bank.getClients().isEmpty()) {
Client.setCount(bank.getClients().size() + 1);
}
if (bank.getAccounts() != null && !bank.getAccounts().isEmpty()) {
Account.setCount(1001 + bank.getAccounts().size());
}
}
}