Skip to content

mehedyk/library-management-system-java-gui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š Library Management System

Java Swing License Status

A Feature-Rich Library Management System Built with Java Swing

Features β€’ Installation β€’ Usage β€’ Screenshots β€’ Contributing β€’ License


🌟 Overview

Welcome to the Library Management System - a comprehensive desktop application designed to streamline library operations with an intuitive graphical user interface. Built entirely in Java using Swing, this project demonstrates robust Object-Oriented Programming principles while providing practical functionality for managing books, members, and transactions.

This is the proof of my CLI to GUI. Also helped me learn OOP. The only downside is that there is no dedicated database. Hope to update the application with the Database soon.

✨ What Makes This Special?

  • 🎨 Clean & Intuitive GUI - Built with Java Swing for a seamless user experience
  • πŸ” Role-Based Access - Separate interfaces for admins and members
  • πŸ“– Complete Book Management - Add, remove, borrow, and return books effortlessly
  • πŸ‘₯ Member Management - Register members and track their activities
  • πŸ—οΈ OOP Excellence - Demonstrates encapsulation, inheritance, abstraction, and polymorphism
  • πŸ’Ύ Zero External Dependencies - Pure Java implementation with no external libraries

πŸš€ Features

πŸ‘¨β€πŸ’Ό Admin Capabilities

πŸ“š Book Management

  • βž• Add new books to the library
  • ❌ Remove books from inventory
  • πŸ“‹ View complete book catalog
  • πŸ“Š Track book quantities

πŸ‘₯ Member Management

  • πŸ‘οΈ View all registered members
  • πŸ“ˆ Monitor member activities
  • πŸ” Access member information
  • πŸ“ Maintain member records

πŸ‘¨β€πŸŽ“ Member Capabilities

  • πŸ” Browse Books - View available books in the library
  • πŸ“– Borrow Books - Check out books with automatic quantity tracking
  • πŸ“š Return Books - Return borrowed books seamlessly
  • πŸ” Secure Login - Personal account with password protection

πŸ’» Technology Stack

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Java Development Kit (JDK 17+)    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Java Swing (GUI Framework)         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Object-Oriented Programming        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Event-Driven Architecture          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Core Technologies

Technology Purpose Version
Java Primary Programming Language JDK 17+
Swing GUI Framework Built-in
AWT Event Handling & Layout Built-in
Collections Data Management java.util

πŸ“¦ Installation

Prerequisites

Before you begin, ensure you have the following installed:

  • β˜• Java Development Kit (JDK) 17 or higher
  • πŸ”§ A Java IDE (IntelliJ IDEA, Eclipse, NetBeans) or text editor
  • πŸ’» A terminal/command prompt

Step-by-Step Setup

1️⃣ Clone the Repository

git clone https://github.com/mehedyk/library-management-system-java-gui.git

2️⃣ Navigate to Project Directory

cd library-management-system-java-gui

3️⃣ Compile the Source Files

cd src
javac *.java

4️⃣ Run the Application

java MainWindow

Alternative: Using an IDE

  1. Open your preferred Java IDE
  2. Import the project as a Java project
  3. Locate MainWindow.java
  4. Run the main() method

🎯 Usage Guide

πŸ”‘ Default Credentials

Admin Access

Username: admin
Password: 1234

πŸ“– Default Books Available

The system comes pre-loaded with classic literature:

ID Title Author Quantity
1 The Catcher in the Rye J.D. Salinger 5
2 To Kill a Mockingbird Harper Lee 3
3 1984 George Orwell 4

🎬 Quick Start Guide

For Administrators:

  1. Launch the application
  2. Click "Login (Admin)"
  3. Enter admin credentials
  4. Access the admin panel to:
    • Add new books
    • Remove existing books
    • View book inventory
    • View member list
    • Logout

For Members:

  1. Launch the application
  2. Click "Register (Member)" (first-time users)
  3. Fill in registration details
  4. Click "Login (Member)"
  5. Enter your credentials
  6. Access member panel to:
    • Browse available books
    • Borrow books
    • Return books
    • Logout

πŸ—οΈ Project Structure

library-management-system-java-gui/
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ MainWindow.java              # Entry point & main menu
β”‚   β”œβ”€β”€ LibraryApp.java              # Application initialization
β”‚   β”‚
β”‚   β”œβ”€β”€ Admin.java                   # Admin model
β”‚   β”œβ”€β”€ AdminLoginWindow.java        # Admin login GUI
β”‚   β”œβ”€β”€ AdminPanelWindow.java        # Admin dashboard
β”‚   β”‚
β”‚   β”œβ”€β”€ Member.java                  # Member model
β”‚   β”œβ”€β”€ MemberLoginWindow.java       # Member login GUI
β”‚   β”œβ”€β”€ MemberPanelWindow.java       # Member dashboard
β”‚   β”œβ”€β”€ MemberRegistrationWindow.java # Member registration GUI
β”‚   β”œβ”€β”€ MemberManager.java           # Member operations
β”‚   β”‚
β”‚   β”œβ”€β”€ Book.java                    # Book model
β”‚   β”œβ”€β”€ BookManager.java             # Book operations
β”‚   β”œβ”€β”€ AddBookWindow.java           # Add book GUI
β”‚   β”‚
β”‚   └── Library.java                 # Library core logic
β”‚
β”œβ”€β”€ LICENSE                          # MIT License
└── README.md                        # Project documentation

🎨 Screenshots

Main Menu

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Library Management System      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  [ Login (Admin) ]              β”‚
β”‚  [ Register (Member) ]          β”‚
β”‚  [ Login (Member) ]             β”‚
β”‚  [ Exit ]                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Admin Panel

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Admin Panel                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  [ Add Book ]                   β”‚
β”‚  [ Remove Book ]                β”‚
β”‚  [ List Books ]                 β”‚
β”‚  [ Member List ]                β”‚
β”‚  [ Logout ]                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Member Panel

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Member Panel                   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  [ List Books ]                 β”‚
β”‚  [ Borrow a Book ]              β”‚
β”‚  [ Return a Book ]              β”‚
β”‚  [ Logout ]                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🧩 Object-Oriented Design

Core Principles Implemented

πŸ”’ Encapsulation

  • Private fields with public getters/setters
  • Data hiding in Book, Member, and Admin classes

🎭 Abstraction

  • Separation of concerns between GUI and business logic
  • Manager classes handle operations abstractly

🧬 Inheritance

  • Potential for future role-based inheritance structure
  • Extensible class hierarchy

πŸ”„ Polymorphism

  • Method overriding capabilities
  • Flexible event handling through ActionListener

Class Relationships

LibraryApp (Static Container)
    β”œβ”€β”€ Library (Data Store)
    β”œβ”€β”€ BookManager (Operations)
    β”œβ”€β”€ MemberManager (Operations)
    └── Admin (Model)

Book (Model)
Member (Model)

Window Classes (GUI Layer)
    β”œβ”€β”€ MainWindow
    β”œβ”€β”€ AdminLoginWindow
    β”œβ”€β”€ AdminPanelWindow
    β”œβ”€β”€ MemberLoginWindow
    β”œβ”€β”€ MemberRegistrationWindow
    β”œβ”€β”€ MemberPanelWindow
    └── AddBookWindow

🚧 Future Enhancements

🎯 Planned Features

  • Database Integration

    • MySQL/PostgreSQL support via JDBC
    • Persistent data storage
    • Transaction history
  • Enhanced GUI

    • JTable for tabular data display
    • Custom icons and themes
    • Dark mode support
    • Responsive layouts
  • Advanced Features

    • Book search functionality
    • Due date tracking
    • Fine calculation for late returns
    • Email notifications
    • Report generation (PDF/Excel)
  • Security Improvements

    • Password encryption
    • Session management
    • Role-based permissions
  • Modern UI Framework

    • JavaFX migration
    • Material Design implementation
    • Web-based interface (Spring Boot)
  • Additional Functionality

    • Book reservations
    • Rating and review system
    • Recommendation engine
    • Multi-library support

🀝 Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated!

How to Contribute

  1. 🍴 Fork the Project
  2. 🌿 Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. ✍️ Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. πŸ“€ Push to the Branch (git push origin feature/AmazingFeature)
  5. πŸ”ƒ Open a Pull Request

Contribution Guidelines

  • Follow Java naming conventions
  • Comment your code appropriately
  • Test thoroughly before submitting
  • Update documentation as needed
  • Maintain the existing code style

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License

Copyright (c) 2025 S.M. Mehedy Kawser

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...

πŸ‘¨β€πŸ’» Author

S.M. Mehedy Kawser

GitHub LinkedIn Facebook


πŸ™ Acknowledgments

  • Him
  • β˜• Oracle for Java and Swing documentation
  • πŸ“š Classic literature authors for default book data
  • πŸ’‘ Open-source community for inspiration
  • πŸŽ“ Everyone who uses and contributes to this project

πŸ“ž Support

If you have any questions, issues, or suggestions:


⭐ Show Your Support

If you found this project helpful, please consider giving it a ⭐ on GitHub!

   ⭐ Star this repository if you like it!

Made by MEHEDYK

Happy Coding!


Last Updated: October 2025

About

A fully functional Library Management System built in Java using Swing for GUI. It includes login functionality for admins and members, book management, borrowing/returning features, and demonstrates core OOP principles. Ideal for academic and personal use.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages