Payroll Management System in Java Swing MySQL — Desktop Project with Pay Slip 2026

Payroll Management System in Java

Payroll Management System in Java

Interested in above project ,Click Below
WhatsApp
Telegram
LinkedIn

If you are a BCA, MCA, or B.Tech CS student looking for a Java Swing final year project that covers real business logic — from salary component configuration and attendance tracking to pay slip generation with gross and net salary calculations — the Payroll Management System built with Java Swing and MySQL is one of the most complete desktop Java projects you can submit in 2026. It runs entirely as a standalone desktop application with no web server required, making it incredibly easy to demo on any lab computer during your viva presentation.

Payroll Management System in Java

Project Overview

Project NamePayroll Management System
TypeDesktop Application
GUI FrameworkJava Swing
LanguageJava JDK 8+
DatabaseMySQL / MariaDB (via XAMPP)
DB ConnectivityJDBC (MySQL Connector/J 8.3.0)
Salary ComponentsHRA, DA, MED, PF, Basic Salary
AttendanceFirst Half / Second Half daily tracking
ReportsPay slip generation and attendance list with print support
Best ForBCA, MCA, B.Tech CS/IT Final Year Students Globally

Key Features

  • Secure login authentication — splash screen loads first, then a login page validates credentials against the login table before granting access to the main menu
  • Complete employee management — add new employees, view the full employee list, update existing records, and delete employees — all from dedicated Swing form screens
  • Salary component configuration — set and update all five salary components (Basic Salary, HRA, DA, Medical, and PF) individually per employee and update them anytime from the Update menu
  • First Half and Second Half attendance tracking — record daily attendance per employee with half-day granularity and view the complete attendance history from the Reports menu
  • Detailed pay slip generation — automatically calculates gross salary, tax deductions, and net salary based on stored components and attendance data and displays a formatted pay slip
  • Print support — print the employee list and attendance reports directly from the application using Java’s built-in print framework
  • Menu-driven navigation — organised Master, Update, and Reports menu bar keeps the interface clean and easy to explain during viva presentations

Technologies Used

LayerTechnologyPurpose
LanguageJava JDK 8+Core application logic and object-oriented design
GUI FrameworkJava SwingAll desktop forms, tables, dialogs, and menu bar
DatabaseMySQL / MariaDBStore employees, salaries, attendance, and login data
DB ConnectivityJDBC (mysql-connector-j-8.3.0)Raw SQL queries from Java to MySQL — no ORM
Local ServerXAMPP / WAMPRun MySQL locally during development and demo
Print SupportJava Print FrameworkPrint employee lists and attendance reports
IDEEclipse / IntelliJ IDEA / NetBeansImport, compile, and run the project

Project Folder Structure

payroll-management-system/
├── src/
│   ├── conn.java                 # JDBC database connection
│   ├── splash.java               # Splash screen — app entry point
│   ├── login.java                # Login page with credential validation
│   ├── home.java                 # Main window with menu bar
│   ├── New_Employee.java         # Add new employee form
│   ├── List_Employee.java        # View all employees (with print)
│   ├── Update_employee.java      # Update or delete employee records
│   ├── Salary.java               # Set salary components for employee
│   ├── Update_salary.java        # Update or delete salary records
│   ├── TakeAttendence.java       # Record daily attendance (First/Second Half)
│   ├── List_Attendence.java      # View attendance records (with print)
│   ├── pay_slip.java             # Generate pay slip (gross + net + tax)
│   ├── icon/                     # Image resources
│   └── icons/                    # Additional icon assets
│
├── payroll.sql                   # Full database schema + seed data
├── lib/
│   └── mysql-connector-j-8.3.0.jar   # JDBC driver — required for DB connection
├── build/
│   └── classes/                  # Compiled .class files
└── README.md

Database Schema

TablePurposeKey Fields
loginAdmin login credentialsusername, password (default: admin / admin)
employeeEmployee personal and job detailsempid, name, designation, department, doj, phone, address
salarySalary components per employeeempid, basic, hra, da, med, pf, gross
attendenceDaily attendance recordsempid, month, year, first_half, second_half

Get This Project

Payroll Management System in Java
Payroll Management System in Java

This is a complete, ready-to-run paid project. It includes the full Java Swing source code, all form classes, the payroll.sql database script, the bundled JDBC connector JAR, and remote setup support from our team.

How to Run This Project

Step 1 — Install prerequisites

1. Java JDK 8 or higher   → https://www.oracle.com/java/downloads/
2. XAMPP (MySQL/MariaDB)  → https://www.apachefriends.org/
3. Eclipse IDE            → https://www.eclipse.org/downloads/
   (or IntelliJ IDEA / NetBeans)

Step 2 — Set up the database

Start Apache and MySQL in XAMPP, then import the SQL script:

# Using MySQL command line:
mysql -u root -p < payroll.sql

# Or using phpMyAdmin:
# Open http://localhost/phpmyadmin → Import → select payroll.sql → Go

This creates the payroll database with all four tables and seeds the default admin login (admin / admin).

Step 3 — Update the database connection

Open src/conn.java and update your MySQL password if it is not blank:

c = DriverManager.getConnection(
    "jdbc:mysql://localhost:3306/payroll",
    "root",           // your MySQL username
    "your_password"   // your MySQL password (blank for default XAMPP)
);

Step 4 — Compile the project

# Windows (use ; as separator)
javac -cp "lib/mysql-connector-j-8.3.0.jar;src" -d build/classes src/*.java

# Linux / macOS (use : as separator)
javac -cp "lib/mysql-connector-j-8.3.0.jar:src" -d build/classes src/*.java

Step 5 — Run the application

# Windows
java -cp "lib/mysql-connector-j-8.3.0.jar;build/classes" splash

# Linux / macOS
java -cp "lib/mysql-connector-j-8.3.0.jar:build/classes" splash

The splash screen loads first, followed by the login page. Use the default credentials to log in:

Username : admin
Password : admin

Application Menu Structure

MenuSub-menuAction
MasterNew EmployeeAdd a new employee record with all personal details
MasterSalarySet all salary components for a selected employee
MasterList EmployeeView all employees in a table — with print support
UpdateUpdate SalaryEdit or delete salary components for any employee
UpdateUpdate EmployeeEdit or delete an existing employee record
UpdateTake AttendanceMark First Half / Second Half attendance per employee
ReportsGenerate Pay SlipCalculate and display gross salary, deductions, and net pay
ReportsList AttendanceView all attendance records — with print support
ExitClose the application

How It Works

Employee and salary setup flow

  1. Admin logs in — login.java queries the login table and starts a session; the main home.java window with the menu bar opens
  2. Admin goes to Master → New Employee and fills in the employee form — the record is inserted into the employee table via JDBC
  3. Admin goes to Master → Salary — selects the employee and enters Basic Salary, HRA, DA, Medical, and PF values — stored in the salary table
  4. Any component can be changed later via Update → Update Salary without affecting the employee record itself
See also  Electronics Learning Management System using JavaFX and MySQL

Attendance recording flow

  1. Admin opens Update → Take Attendance and selects the employee and month
  2. Marks each day as First Half present, Second Half present, or absent
  3. The attendance data is saved to the attendence table with the employee ID, month, and year
  4. Admin can view the full attendance history under Reports → List Attendance and print it directly from the application

Pay slip generation flow

  1. Admin opens Reports → Generate Pay Slip and selects the employee and month
  2. The pay_slip.java class queries the salary and attendence tables for that employee
  3. Gross salary is calculated from the stored salary components; deductions (PF and tax) are subtracted to compute net salary
  4. A formatted pay slip is displayed on screen showing employee details, all components, gross pay, deductions, and net salary

Why This is a Great Final Year Project

  • Java Swing desktop application — demonstrates GUI programming with forms, tables, dialogs, and a menu bar — all core Java skills tested in university exams
  • Salary component calculation logic (HRA, DA, PF, gross, net, tax) shows you understand real business rules that companies actually implement in their HR systems
  • JDBC raw SQL without ORM — using raw PreparedStatement and ResultSet demonstrates a thorough understanding of how Java connects to and queries a database
  • First Half / Second Half attendance is a granular, real-world attendance model that makes your project stand out from basic present/absent systems
  • Print support for reports — being able to physically print the employee list and attendance reports during a viva demonstration is immediately impressive
  • No web server needed — runs directly with java splash from the command line; nothing to configure during live demo apart from XAMPP and the SQL import
  • Complete end-to-end flow — login → add employee → set salary → mark attendance → generate pay slip covers every major HR payroll concept in one project

SEO Details

  • payroll management system in java
  • payroll management system in java netbeans source code
  • payroll management system project in java
  • payroll management system project in java pdf
  • payroll management system project in java github
  • employee payroll management system in java
  • payroll management system source code in java
  • employee payroll management system project in java
  • employee payroll management system project in java with source code
  • what is payroll management systempayroll management system project
  • payroll management system project report pdf
  • payroll management system github
  • payroll management system project pdf
  • payroll management system meaning
  • payroll management system er diagram
  • payroll management system use case diagram
  • payroll management system class diagram
  • payroll management system kya hai
  • payroll management system example

🎓 Need Complete Final Year Project?

Get Source Code + Report + PPT + Viva Questions (Instant Access)

🛒 Visit UpdateGadh Store →
💬 Chat Now