LIBRARY MANAGMENT SYATEM
LIBRARY MANAGMENT SYATEM
of
II-B.Tech. I-Semester
in
K NEERAJ (23R01A66F1)
K CHARAN (23R01A66F2)
K DINESH (23R01A66F3)
(UGC AUTONOMUS)
(Approved by AICTE, Affiliated to JNTUH, Kukatpally, Hyderabad)
Kandlakoya, Medchal Road, Hyderabad – 501401.
2024-2025
i
CMR INSTITUTE OF TECHNOLOGY
(UGC AUTONOMUS)
(Approved by AICTE, Affiliated to JNTUH, Kukatpally, Hyderabad)
Kandlakoya, Medchal Road, Hyderabad– 501401.
Department of Computer Science and Engineering (AI &ML)
CERTIFICATE
This is to certify that a Micro Project entitled with: “Library Management System”
Submitted By
K NEERAJ (23R01A66F1)
K CHARAN (23R01A66F2)
K DINESH (23R01A66F3)
In partial fulfillment of the requirement for award of the OOP through Java Lab of II-B. Tech
I- Semester in CSE(AI&ML) towards a record of a bonafide work carried out under our guidance
and supervision.
ii
ACKNOWLEDGEMENT
We are extremely grateful to Dr. M. Janga Reddy, Director, Dr. G. Madhusudhana Rao,
Principal and Mr. P. Pavan Kumar, Head of Department, Dept of Computer Science and
Engineering, CMR Institute of Technology for their inspiration and valuable guidance during entire
duration.
We are extremely thankful to our OOP through Java Lab faculty in-charge Dr. Y. Nagesh,
Computer Science and Engineering (DS) department, CMR Institute of Technology for her constant
guidance, encouragement and moral support throughout the project.
We express our thanks to all staff members and friends for all the help and coordination extended
in bringing out this Project successfully in time.
Finally, we are very much thankful to our parents and relatives who guided directly or indirectly
for successful completion of the project.
K NEERAJ (23R01A66F1)
K CHARAN (23R01A66F2)
K DINESH (23R01A66F3)
iii
CONTENTS:
iv
ABSTRACT
Library management system is a project which aims in developing a computerized system to maintain
all the daily work of library .This project has many features which are generally not available in normal library
management systems like facility of user login and a facility of teachers login .It also has a facility of admin
login through which the admin can monitor the whole system It also has facility of an online notice board
where teachers can student can put up information about workshops or seminars being held in our colleges or
nearby colleges and librarian after proper verification from the concerned institution organizing the seminar
can add it to the notice board.
It has also a facility where student after logging in their accounts can see list of books issued and its
issue date and return date and also the students can request the librarian to add new books by filling the book
request form. The librarian after logging into his account i.e. admin account can generate various reports such
as student report, issue report, teacher report and book report Overall this project of ours is being developed
to help the students as well as staff of library to maintain the library in the best way possible and also reduce
the human efforts.
1
INTRODUCTION
Library Management System is a comprehensive system designed to assist in the efficient and effective
management of a library. This system aims to provide library staff with tools to efficiently manage the library's
collection, resources, and patron data.
Library Management System is an application which refers to library systems which are generally
small or medium in size. It is used by librarian to manage the library record various transactions like issue of
books, return of books, addition of new books, addition of new students etc. Books and student maintenance
modules are also included in this system which would keep track of the students using the library and also a
detailed description about the books a library contains. In addition, report module is also included in Library
Management System. If user's position is admin, the user is able to generate different kinds of reports like lists
of students registered, list of books, issue and return reports. All these modules are able to help librarian to
manage the library.
2
REQUIREMENTS
To implement the Library Management System, several technical and functional requirements
must be fulfilled. These requirements ensure that the system operates efficiently and delivers an
optimal user experience.
1. Hardware Requirements
• Disk Space: At least 500MB free space for program files and data storage.
• Monitor: A standard display with a resolution of 1366x768 or higher for effective GUI
rendering.
2. Software Requirements
• Java Development Kit (JDK): Version 8 or higher for compiling and running the
application.
• Dependencies: Basic Java libraries such as javax.swing, java.awt, and java.util. These
libraries support GUI components, event handling, and data structures.
3. Functional Requirements
• Login System: A secure login feature where only authorized users (e.g., admin) can access
the system. This ensures data security and prevents unauthorized access.
• Book Management: The system must allow administrators to add, update, and remove
books, categorized by department and subject.
• Book Operations: Features such as checking book availability, borrowing, and returning
books must be included. The system should handle concurrent user requests without errors.
• Dynamic Updates: The ability to handle updates dynamically, such as adding new
departments, subjects, or books, without restarting the application.
These requirements establish a solid foundation for the Library Management System, ensuring
it is robust, user-friendly, and scalable. The integration of modern GUI components and efficient
backend logic enhances its usability and reliability.
3
PURPOSE
The purpose of this project is to provide a friendly environment to maintain the details of books
and library members.
The main purpose of this project is to maintain easy circulation system using computers and to
provide different reports.
Due to computerized information, it reduces the risk of paper work such as file lost, file damaged
and time consuming. It can help user to manage the transaction or record more effectively and
timesaving.
4
IMPLEMENTATION
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.ArrayList;
import java.util.HashMap;
import javax.swing.table.DefaultTableModel;
public LibraryManagementSystem() {
setTitle("Library Management System");
setSize(800, 600);
setDefaultCloseOperation(EXIT_ON_CLOSE);
// Add Panels
mainPanel.add(createLoginPanel(), "login");
mainPanel.add(createMainMenuPanel(), "menu");
mainPanel.add(createManageBooksPanel(), "manageBooks");
mainPanel.add(createMembershipPanel(), "membership");
mainPanel.add(createBookOperationsPanel(), "bookOperations");
mainPanel.add(createDisplayBooksPanel(), "displayBooks");
add(mainPanel);
cardLayout.show(mainPanel, "login");
}
gbc.gridx = 0;
gbc.gridy = 0;
loginPanel.add(new JLabel("Username:"), gbc);
gbc.gridx = 1;
loginPanel.add(usernameField, gbc);
gbc.gridx = 0;
gbc.gridy = 1;
loginPanel.add(new JLabel("Password:"), gbc);
gbc.gridx = 1;
loginPanel.add(passwordField, gbc);
gbc.gridx = 0;
gbc.gridy = 2;
gbc.gridwidth = 2;
loginPanel.add(loginButton, gbc);
return loginPanel;
}
6
displayBooksButton.addActionListener(e -> cardLayout.show(mainPanel, "displayBooks"));
menuPanel.add(manageBooksButton);
menuPanel.add(manageMembersButton);
menuPanel.add(bookOperationsButton);
menuPanel.add(displayBooksButton);
return menuPanel;
}
addBookButton.addActionListener(e -> {
String department = (String) departmentField.getSelectedItem();
String subject = (String) subjectField.getSelectedItem();
String title = bookTitleField.getText();
String author = bookAuthorField.getText();
gbc.gridx = 0;
gbc.gridy = 0;
manageBooksPanel.add(new JLabel("Department:"), gbc);
gbc.gridx = 1;
manageBooksPanel.add(departmentField, gbc);
7
gbc.gridx = 0;
gbc.gridy = 1;
manageBooksPanel.add(new JLabel("Subject:"), gbc);
gbc.gridx = 1;
manageBooksPanel.add(subjectField, gbc);
gbc.gridx = 0;
gbc.gridy = 2;
manageBooksPanel.add(new JLabel("Book Title:"), gbc);
gbc.gridx = 1;
manageBooksPanel.add(bookTitleField, gbc);
gbc.gridx = 0;
gbc.gridy = 3;
manageBooksPanel.add(new JLabel("Book Author:"), gbc);
gbc.gridx = 1;
manageBooksPanel.add(bookAuthorField, gbc);
gbc.gridx = 0;
gbc.gridy = 4;
gbc.gridwidth = 2;
manageBooksPanel.add(addBookButton, gbc);
gbc.gridy = 5;
manageBooksPanel.add(backButton, gbc);
return manageBooksPanel;
}
addMemberButton.addActionListener(e -> {
String name = memberNameField.getText();
String email = memberEmailField.getText();
if (!name.isEmpty() && !email.isEmpty()) {
members.add(new Member(name, email));
JOptionPane.showMessageDialog(this, "Member added successfully!");
} else {
JOptionPane.showMessageDialog(this, "Please fill all fields.");
}
8
});
gbc.gridx = 0;
gbc.gridy = 0;
membershipPanel.add(new JLabel("Member Name:"), gbc);
gbc.gridx = 1;
membershipPanel.add(memberNameField, gbc);
gbc.gridx = 0;
gbc.gridy = 1;
membershipPanel.add(new JLabel("Member Email:"), gbc);
gbc.gridx = 1;
membershipPanel.add(memberEmailField, gbc);
gbc.gridx = 0;
gbc.gridy = 2;
gbc.gridwidth = 2;
membershipPanel.add(addMemberButton, gbc);
gbc.gridy = 3;
membershipPanel.add(backButton, gbc);
return membershipPanel;
}
checkAvailabilityButton.addActionListener(e -> {
String department = (String) departmentField.getSelectedItem();
String subject = (String) subjectField.getSelectedItem();
String title = bookTitleField.getText();
9
JOptionPane.showMessageDialog(this, message);
} else {
JOptionPane.showMessageDialog(this, "Please fill all fields.");
}
});
checkoutButton.addActionListener(e -> {
String department = (String) departmentField.getSelectedItem();
String subject = (String) subjectField.getSelectedItem();
String title = bookTitleField.getText();
returnBookButton.addActionListener(e -> {
String department = (String) departmentField.getSelectedItem();
String subject = (String) subjectField.getSelectedItem();
String title = bookTitleField.getText();
gbc.gridx = 0;
gbc.gridy = 0;
bookOpsPanel.add(new JLabel("Department:"), gbc);
gbc.gridx = 1;
bookOpsPanel.add(departmentField, gbc);
gbc.gridx = 0;
gbc.gridy = 1;
bookOpsPanel.add(new JLabel("Subject:"), gbc);
gbc.gridx = 1;
bookOpsPanel.add(subjectField, gbc);
gbc.gridx = 0;
gbc.gridy = 2;
bookOpsPanel.add(new JLabel("Book Title:"), gbc);
gbc.gridx = 1;
10
bookOpsPanel.add(bookTitleField, gbc);
gbc.gridx = 0;
gbc.gridy = 3;
gbc.gridwidth = 2;
bookOpsPanel.add(checkAvailabilityButton, gbc);
gbc.gridy = 4;
bookOpsPanel.add(checkoutButton, gbc);
gbc.gridy = 5;
bookOpsPanel.add(returnBookButton, gbc);
gbc.gridy = 6;
bookOpsPanel.add(backButton, gbc);
return bookOpsPanel;
}
11
displayBooksPanel.setBackground(new Color(255, 253, 208)); // Morning yellow
background
gbc.gridx = 0;
gbc.gridy = 0;
displayBooksPanel.add(new JLabel("Department:"), gbc);
gbc.gridx = 1;
displayBooksPanel.add(departmentField, gbc);
gbc.gridx = 0;
gbc.gridy = 1;
displayBooksPanel.add(new JLabel("Subject:"), gbc);
gbc.gridx = 1;
displayBooksPanel.add(subjectField, gbc);
gbc.gridx = 0;
gbc.gridy = 2;
gbc.gridwidth = 2;
displayBooksPanel.add(showBooksButton, gbc);
12
gbc.gridy = 3;
gbc.gridwidth = 2;
displayBooksPanel.add(scrollPane, gbc);
gbc.gridy = 4;
displayBooksPanel.add(backButton, gbc);
return displayBooksPanel;
}
13
case "CSE":
return new String[]{"Data Structures", "Operating Systems", "DBMS"};
case "ECE":
return new String[]{"Signals", "Microprocessors", "VLSI"};
case "EEE":
return new String[]{"Power Systems", "Control Systems", "Machines"};
case "MECH":
return new String[]{"Thermodynamics", "Fluid Mechanics", "Kinematics"};
case "CIVIL":
return new String[]{"Surveying", "Structural Analysis", "Geotechnics"};
default:
return new String[]{};
}
}
class Book {
private String title, author;
private int quantity;
class Member {
private String name, email;
14
public Member(String name, String email) {
this.name = name;
this.email = email;
}
}
15
OUTPUT
1) Librarian login page
2) Menu page
16
3) Display books
4) Manage book
17
5) Membership
6) Book operations
18
➢ If it is available this message will popup
19
➢ If you return the book then this will popup
20
BENEFITS OF LIBRARY MANAGEMENT SYSTEM
• User friendly.
• Highly flexibility.
• Highly secure.
• Risk reduction.
• Inventory and stock management.
• Complete reports.
• No filling errors.
• Using library management system the librarian can catalogue and maintain all types of
books, journals, CD's etc.
• Provision to request for new titles, journals and magazines.
• Powerful search engine allows users to find information in the library in no time.
• Charge users for lost/damaged books.
• Automatic fine fees calculation.
• Newspapers attendance is maintained.
21
CONCLUSION
In conclusion, a Library Management System is an essential tool for libraries of all sizes. By
providing efficient and effective management of library operations, it helps ensure the library
remains a valuable community resource.
With the evolution of technology and it being so blended in our daily lives, it is imperative that we
discard time-consuming laborious methods to implement something which would be so clean and
compact to use through computers. This system provides efficient service to the various users.
Implemented with the best technology available, this software is convenient to use and virtually
fault-free, providing the users with a smooth and unique experience
22
REFERENCE
❖ Javatpoint https://www.javatpoint.com/java-swing
❖ Gfg https://www.geeksforgeeks.org/java-jframe/
❖ Oracle https://docs.oracle.com/javase/7/docs/api/javax/swing/JFrame.html
23