Library Management Report
Library Management Report
Report
1. Introduction
This project is a Library Management System developed using Java Swing. It provides a
graphical user interface (GUI) to manage a collection of books and organize them into
categories. The system allows adding, editing, removing, and displaying books, as well as
managing the list of categories and viewing the count of books in each category.
2. Project Components
a) Book.java
This file defines the Book class, which stores details about each book.
Attributes:
- title → Book title
- author → Author name
- isbn → ISBN number
- category → Book category
- description → Short description
- available → Availability (true/false)
- year → Year of publication
Methods:
- Getters and setters for each attribute
- toString() → formats book as "Title by Author (Year)"
b) BookPanel.java
This file creates the GUI for managing books.
Main Features:
- Table (JTable) showing all books.
- Input fields for title, author, ISBN, category, year, description.
- Add, Edit, Remove, Clear buttons.
- Export and Import buttons (placeholders, not implemented).
- Sample books loaded for testing.
Important Methods:
- addBook() → Validates and adds a book.
- editBook() → Updates details of selected book.
- removeBook() → Deletes selected book.
- clearFields() → Resets the input form.
- loadSampleBooks() → Loads 100+ predefined books.
The design uses GridBagLayout for alignment and styled Swing components for a clean
UI.
c) CategoryPanel.java
This file creates the GUI for managing categories.
Main Features:
- Input field to add new category.
- Table showing category name + number of books.
- Add Category, Remove Category buttons.
Important Methods:
- addCategory() → Adds a category.
- removeCategory() → Deletes selected category.
- updateCategoryCounts() → Updates table with current book counts.
It interacts with the BookPanel to calculate how many books belong to each category.
3. Technologies Used
- Java SE 8 or above
- Java Swing (JPanel, JTable, JTextField, JTextArea, JButton)
- Layouts: BorderLayout, GridBagLayout, FlowLayout
- Collections: ArrayList, List
- Table Models: DefaultTableModel
4. Strengths and Limitations
Strengths:
✅ User-friendly GUI
✅ Organized code structure (MVC pattern)
✅ Uses Java Swing components effectively
✅ Preloaded sample books
Limitations:
⚠ No database connection
⚠ Export/Import functions not yet implemented
⚠ Data is lost when program closes
5. Learning Points
While working on this project, you learn:
- How to design GUI applications in Java.
- How to handle events (like button clicks).
- How to use JTable with DefaultTableModel.
- How to manage lists and update the UI dynamically.
6. Conclusion
This Library Management System is a good example of a basic CRUD (Create, Read,
Update, Delete) application using Java Swing. It provides all the core features required to
manage books and categories and can be extended further by adding file handling, search,
sorting, and database integration.