Skip to content

ShubhamPaliwal157/Java-Student-Management-System

Repository files navigation

Java Student Management System

A Java Swing Desktop Application


About

A complete, production-quality Student Management System built entirely in Java SE. Features a dark-themed Swing GUI, persistent file-based storage, live dashboard with charts, full CRUD operations, and CSV export — no external libraries needed.


Features

Feature Description
Dashboard Live stats (total students, avg CGPA, department count, top CGPA), bar chart, donut chart, recent additions
Add Student Form with validation — name, roll, dept, year, email, phone, CGPA, gender, address
Edit Student Update any field; roll-number uniqueness enforced
Delete Confirm-before-delete dialog
Search & Filter Filter by department dropdown; search by name / roll / email
CSV Export Export full student list to .csv for Excel/Sheets
Persistent Storage Data survives app restarts (saved in data/students.dat)
Dark UI Custom-painted Swing components — no third-party UI library

Project Structure

StudentMS/
├── src/
│   ├── Main.java                        ← Entry point
│   └── sms/
│       ├── model/
│       │   └── Student.java             ← Domain model (Serializable)
│       ├── dao/
│       │   ├── StudentDAO.java          ← DAO interface
│       │   └── FileStudentDAO.java      ← File-based implementation
│       ├── util/
│       │   └── Util.java                ← Validator + Theme + ExportUtil
│       └── ui/
│           ├── Components.java          ← Reusable styled widgets
│           ├── MainWindow.java          ← JFrame + sidebar navigation
│           ├── DashboardPanel.java      ← Stats + charts
│           ├── StudentListPanel.java    ← Table + CRUD + search
│           ├── StudentFormDialog.java   ← Add/Edit modal
│           └── AboutPanel.java          ← App info
├── data/                                ← Auto-created; holds students.dat
├── out/                                 ← Compiled .class files
├── build.sh                             ← Linux/macOS build & run
├── build.bat                            ← Windows build & run
└── README.md

How to Run

Prerequisites

  • Java 17 or later installed
    java -version
    # Should show: openjdk 17 (or higher)
    Download from: https://adoptium.net

Option A — Linux / macOS

cd StudentMS
chmod +x build.sh
./build.sh

Option B — Windows

cd StudentMS
build.bat

Option C — Manual (any OS)

# 1. Compile
mkdir out
javac -d out -sourcepath src src/Main.java

# 2. Run
java -cp out Main

How to Use

Launching

Run the app. On first launch, 10 sample students are automatically added so you can explore all features right away.


Dashboard

  • Shows 4 stat cards: Total Students | Average CGPA | Departments | Top CGPA
  • Bar chart shows students per department
  • Donut chart shows year-wise split
  • Recent additions list at the bottom

Student Records Page

Click Students in the sidebar.

Action How
Add Click ➕ Add → fill form → click Save
Edit Select a row → click ✏️ Edit (or double-click row)
Delete Select a row → click 🗑 Delete → confirm
Search Type in the search box → press Enter or 🔍 Search
Filter by Dept Select from the department dropdown
Export CSV Click 📤 Export → choose save location
Refresh Click 🔄 Refresh to reset filters and reload

/Edit Student Form

Field Required Validation
Full Name Min 2 characters
Roll Number 3–20 alphanumeric, unique
Department Select from list
Year 1–4
Email Valid email format
Phone 10-digit Indian mobile
CGPA 0.0 – 10.0
Gender Select from list
Address Free text

Grade Scale

CGPA Grade
9.0 – 10.0 O (Outstanding)
8.0 – 8.9 A+
7.0 – 7.9 A
6.0 – 6.9 B+
5.0 – 5.9 B
4.0 – 4.9 C
< 4.0 F

🏗 Java Concepts Demonstrated

Concept Where
Classes & Encapsulation Student.java — private fields, getters/setters
Interfaces StudentDAO.java — defines storage contract
Inheritance NavButton extends JButton, PanelCard extends JPanel
Exception Handling All DAO methods, form validation, file I/O
File I/O FileStudentDAO — ObjectOutputStream/InputStream
Threads StudentListPanel.runTask() — background data loading
Collections LinkedHashMap, ArrayList, Stream API
Generics List<Student>, Map<String, Long>
Lambda / Functional ThrowingRunnable, stream filters, action listeners
Swing Events MouseListener, KeyListener, ActionListener
Custom Painting paintComponent() in charts, cards, buttons
Serialization Student implements Serializable

Data Storage

Data is saved to data/students.dat using Java Object Serialization. The file is created automatically on first run. Do not delete this file if you want to keep your records.

To reset all data: delete data/students.dat and restart the app.


CSV Export Format

ID,Roll Number,Name,Department,Year,Email,Phone,CGPA,Grade,Gender,Enrollment Date
1,CS2021001,Riya Sharma,Computer Science,1st Year,...,9.20,O,Female,15-04-2025

Built with ❤️ by Shubham Paliwal using Java SE + Swing

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages