-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
44 lines (39 loc) · 1.49 KB
/
Main.java
File metadata and controls
44 lines (39 loc) · 1.49 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package org.app;
import org.app.gui.AssignmentTrackerGUI;
import javax.swing.*;
/**
* Main entry point for BUP UCAM Assignment Tracker
* A comprehensive assignment management system for Bangladesh University of Professionals
* Now with modern Swing GUI interface
*/
public class Main {
public static void main(String[] args) {
// Set look and feel for better integration
try {
// Try to set Nimbus look and feel for modern appearance
for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (Exception e) {
// Use default look and feel if Nimbus is not available
}
// Launch GUI on Event Dispatch Thread
SwingUtilities.invokeLater(() -> {
try {
new AssignmentTrackerGUI();
} catch (Exception e) {
System.err.println("An error occurred while starting the application:");
System.err.println(e.getMessage());
e.printStackTrace();
// Show error dialog to user
JOptionPane.showMessageDialog(null,
"Failed to start BUP UCAM Assignment Tracker:\n" + e.getMessage(),
"Application Error",
JOptionPane.ERROR_MESSAGE);
}
});
}
}