A professional, full-featured Employee Management System built with Java Swing, featuring a premium dark-themed UI, sidebar dashboard, salary analytics, attendance tracking, leave management, CSV/PDF export, and offline demo mode.
- Add Employee - Register new employees with full details (name, CNIC, salary, department, etc.)
- View Employees - Browse all employees with advanced multi-field search (name, email, phone, department)
- Update Employee - Edit any employee record
- Remove Employee - Delete employees with confirmation
- Employee Profile - Detailed profile view with avatar, status badge, and all fields (double-click any row)
- Department Cards - Visual cards showing employee count per department (clickable to filter)
- Department Filter - Dropdown filter on employee tables
- 5 Default Departments: Engineering, Human Resources, Finance, Marketing, Operations
- Daily Attendance - Mark employees as Present / Absent / Late for today
- Bulk Marking - Select multiple employees and mark at once
- Attendance History - Per-employee history dialog with all past records
- Live Stats - Real-time Present/Absent/Late counters
- Leave Types - Sick Leave (10 days), Casual Leave (8 days), Annual Leave (15 days)
- Leave Balance - Per-employee balance tracking with visual cards
- Apply Leave - Submit new leave requests with date range and reason
- Approve/Reject - Admin can approve or reject pending leave requests
- Summary Cards - Total Payroll, Average Salary, Highest/Lowest Salary
- Bar Chart - Custom-painted horizontal bar chart showing average salary by department
- Top Earners - Leaderboard of top 5 highest-paid employees
- CSV Export - One-click export for: All Employees, Attendance, Leaves, Salary, Department Summary
- Report Preview - Live preview table before exporting
- Enhanced PDF Payslip - Professional payslip with salary breakdown (Basic 60%, Housing 20%, Transport 10%, Medical 10%), attendance summary, and leave balances
- Sidebar Dashboard - Professional sidebar navigation with organized sections
- Toast Notifications - Animated slide-in notifications (success/error/warning/info) instead of popup dialogs
- Keyboard Shortcuts - Ctrl+N (Add), Ctrl+F (Search), Ctrl+D (Departments), Ctrl+R (Reports)
- Dark Theme - Premium deep navy + teal accent design across all screens
- Settings - Theme toggle, demo credentials config, database connection reference
- About Page - App version, tech stack, and feature summary
- JDK 17 or higher installed and added to system PATH
- MySQL Server (Optional - only needed for persistent data storage)
# 1. Clone the repository
git clone https://github.com/IntelliSaad/Employee-Management-System-EMS-Java.git
cd Employee-Management-System-EMS-Java
# 2. Run the application
run.bat- Log in with demo credentials:
- Username:
admin - Password:
admin123
- Username:
The application ships with Demo Mode enabled by default - 10 sample employees across 5 departments with pre-populated attendance and leave records.
To save data permanently with MySQL, follow these 3 steps:
Open MySQL Workbench (or any MySQL client) and execute the SQL script:
src/Employee_Management_System/EMPLOYEE.sql
Open src/Employee_Management_System/Connect.java and:
- Uncomment the database connection block (lines 11-24)
- Comment out the demo mode line (line 28)
- Update the password if yours differs from
Flowers@123
// In Connect.java — UNCOMMENT this block:
try {
Class.forName("com.mysql.cj.jdbc.Driver");
c = DriverManager.getConnection("jdbc:mysql://localhost:3306/EmployeeManagement", "root", "YOUR_PASSWORD");
s = c.createStatement();
demoMode = false; // Change to false
} catch (Exception e) { e.printStackTrace(); }run.batEmployee_Management_Sys/
|-- src/Employee_Management_System/
| |-- Front_page.java # Splash / welcome screen
| |-- Login.java # Authentication screen
| |-- Home.java # Sidebar dashboard
| |-- AddEmployee.java # Add employee form
| |-- ViewEmployee.java # Employee directory + search
| |-- UpdateEmployee.java # Edit employee form
| |-- RemoveEmployee.java # Delete employee screen
| |-- EmployeeDetail.java # Full employee profile view
| |-- DepartmentView.java # Department management
| |-- AttendanceTracker.java # Daily attendance marking
| |-- LeaveManagement.java # Leave requests & approvals
| |-- SalaryStats.java # Salary analytics dashboard
| |-- ReportCenter.java # CSV/PDF report hub
| |-- CSVExporter.java # CSV export utility
| |-- EnhancedPayslip.java # PDF payslip generator
| |-- PayslipPrinter.java # Legacy payslip printer
| |-- ToastNotification.java # Animated notification system
| |-- SettingsPanel.java # App settings screen
| |-- AboutPage.java # About page
| |-- DemoData.java # Central demo data store
| |-- Connect.java # Database connection manager
| |-- EMPLOYEE.sql # MySQL schema script
|-- lib/
| |-- flatlaf-3.5.jar # FlatLaf Look & Feel
| |-- mysql-connector-java-8.0.30.jar
| |-- itextpdf-5.5.13.3.jar # PDF generation
| |-- jcalendar-1.4.jar # Date picker widget
|-- run.bat # Windows execution script
|-- README.md
| Shortcut | Action |
|---|---|
Ctrl+N |
Add New Employee |
Ctrl+F |
View / Search Employees |
Ctrl+D |
Departments |
Ctrl+R |
Reports |
| Component | Technology |
|---|---|
| Language | Java 17+ |
| UI Framework | Java Swing + FlatLaf 3.5 (Dark Theme) |
| Database | MySQL 8.0 (Optional) |
| PDF Generation | iTextPDF 5.5.13 |
| Date Picker | JCalendar 1.4 |
| Architecture | Event-Driven, MVC-like |
| Build | javac (no Maven/Gradle required) |
(Run the application and capture screenshots of the sidebar dashboard, employee directory, salary analytics, and attendance tracker)
This project is licensed under the MIT License - see the LICENSE file for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/new-feature) - Commit your changes (
git commit -m 'Add new feature') - Push to the branch (
git push origin feature/new-feature) - Open a Pull Request