This is a Java-based Student Attendance Management System built with Swing for the GUI and MySQL as the database backend. It allows you to add, update, delete, and view student attendance records for multiple subjects.
- β Add student attendance data (Name, Matric Number, Subject, Total Classes, Classes Attended)
- βοΈ Edit existing records
- β Delete students by Matric Number
- π View records in a scrollable JTable
- π Calculates total attendance percentage automatically
- π Connected to a MySQL database using JDBC
- π» User-friendly interface using Java Swing
Attendance-Manager-Java/
βββ src/
β βββ Attendance.java # Main GUI and logic
β βββ attest.java # Launches the GUI
β βββ Database (MySQL DB) # Contains attendance table
Database: intern
Table: attendance
CREATE TABLE attendance (
matric_number VARCHAR(20) PRIMARY KEY,
NAME VARCHAR(100),
SUBJECT VARCHAR(20),
TOTAL_CLASSES INT,
CLASSES_ATTENDED INT,
TOTAL_ATTENDANCE VARCHAR(10)
);- Open MySQL
- Create database:
intern - Run the SQL script above to create the
attendancetable.
// Replace with your actual MySQL credentials
Connection conn = DriverManager.getConnection(
"jdbc:mysql://localhost:3306/intern", "root", "password");You can compile and run using IntelliJ, Eclipse, or the terminal:
javac Attendance.java attest.java
java attestThe application uses Java Swing and displays input fields on the left and the student table on the right. Clicking a student row populates the fields for editing.