Enhanced Library Management System: Department of Computer Science
Enhanced Library Management System: Department of Computer Science
S.Narmatha
Register No. U20CA0060
T.Mohana
Register No. U20CA0054
Dr. M.Subhashini
M.C.A., M.Phil., Ph.D.,
CERTIFICATE
This is to certify that the Project Report appellation entitled "Enhanced Library
Management System"submitted to Srimad Andavan Arts & Science College (Autonomous),
Affiliated to Bharathidasan University, Tiruchirappalli in partial fulfillment of the requirement
for the award of the degree of Bachelor of Computer Applications for the academic Year
2022-2023, is a bonafide record of the project work done by S.Narmatha under my guidance
and supervision. The dissertation has not previously formed the basis for the award of any
degree or fellowship to the candidate.
Comments:
Date:
DECLARATION
I declare that the project work entitled “Enhanced Library Management System”
submitted to, Srimad Andavan Arts and Science College (Autonomous), affiliated to
Bharathidasan University, Tiruchirappalli in partial fulfillment of the requirement for the
award of the degree of Bachelor of Computer Applications for the academic year 2022-2023,
is the result of the original work carried out by me under the guidance and supervision of Dr.
M.Subhashini, Department of Computer Science, Srimad Andavan Arts and Science College
(Autonomous), Thiruchirappalli.
Date :
Place :
S.Narmatha
VIVA VOCE
First, I am very thankful to the Almighty for showering the Blessings throughout my life.
I would like to express my heartfelt thanks to my beloved parents who have sacrificed a lot for
my future. This support was the foundation stone for my efforts.
I wish to express my heartfelt thanks to my friends for their useful tips that helped me to
complete this project successfully.
CONTENT
1 Introduction
Requirement specification
Design
Implementation
4
4.1 Source Code
4.2 Screenshots
5 Testing
6 Conclusion
7 Bibliography
ABSTRACT
INTRODUCTION
A system is a set of connected parts/components forming a complex whole. It contains entities,
namely, men, machines and materials. These entities are integrated to serve definite purpose and
objectives. The system components are inter-related, inter-dependent and have effect on each
other as a whole. Thus a library is also a system and its various sections/divisions are its
components. The primary objective of any library system is to collect, store, organize, retrieve
and make available the information sources to the information users. A library, as a system, is a
subsystem of some super-system (an organization in any field, whether education, research or
social service). It has its own subsystems, such as, acquisition system, circulation system,
administration system, etc. In this lesson, you will learn library management and the role of
Library Management is the adaptation of the principles and techniques of management to the
library situation. It includes decision making and getting the work done by others. The five
fundamental management functions are: Planning, Organizing, Staffing, Leading and
Controlling.
Libraries have an important role to play in facilitating access to information for learning,
education and training. It is a known fact that a well-managed library is a successful library. The
library management means efficient and effective management of material (information sources),
machinery, men (human resource), technology and money to meet the objectives of the library.
Thus, librarian as manager performs all the functions of manager/administrator.
REQUIREMENTS SPECIFICATION
2.1 HARDWARE REQUIREMENTS
The proposed system provides the features like issue books and barrow book via in
this application. The proposed application’s improvement in control and performance request
column for the librarian for providing new books. The system is developed to cope up with the
current issues and problems of the library. The system can add user, validate the user. A separate
column for the digital library that librarian is able to search the record by using few clicks of the
mouse and few search keywords thus saving his valuable time. Student login page
where student can find books issued by him/her and date of return.
ADVANTAGES
Front End
Java
Java programming language was originally developed by Sun Microsystems which was initiated
by James Gosling and released in 1995 as core component of Sun Microsystems' Java
platform (Java 1.0 [J2SE]). The latest release of the Java Standard Edition is Java SE 8. With the
advancement of Java and its widespread popularity, multiple configurations were built to suit
various types of platforms. For example: J2EE for Enterprise Applications, J2ME for Mobile
Applications. The new J2 versions were renamed as Java SE, Java EE, and Java ME respectively.
Java is guaranteed to be Write Once, Run Anywhere.
FEATURES
Object Oriented − In Java, everything is an Object. Java can be easily extended since it is based
on the Object model.
Platform Independent − unlike many other programming languages including C and C++, when
Java is compiled, it is not compiled into platform specific machine, rather into platform
independent byte code. This byte code is distributed over the web and=interpreted by the
JavaVirtual Machine (JVM) on whichever platform it is being run on.
Simple − Java is designed to be easy to learn. If you understand the basic concept of OOP Java,
it would be easy to master.
Secure − With Java secure feature it enables to develop virus-free, tamper-free systems.
Authentication techniques are based on public-key encryption.
Robust − Java makes an effort to eliminate error prone situations by emphasizing mainly on
compile time error checking and runtime checking.
Multithreaded − With Java's multithreaded feature it is possible to write programs that can
perform many tasks simultaneously. This design feature allows the developers to construct
interactive applications that can run smoothly.
Interpreted − Java byte code is translated on the fly to native machine instructions and is not
stored anywhere. The development process is more rapid and analytical since the linking is an
incremental and light-weight process.
High Performance − With the use of Just-In-Time compilers, Java enables high
performance.
JAVA ARCHITECTURE
Java combines both the approaches of compilation and interpretation. First, java compiler
compiles the source code into bytecode. At the run time, Java Virtual Machine (JVM) interprets
this bytecode and generates machine code which will be directly executed by the machine in
which java program runs. So java is both compiled and interpreted language.
JVM is a component which provides an environment for running Java programs. JVM
interprets the bytecode into machine code which will be executed the machine in which the Java
program runs.
Platform independence is one of the main advantages of Java. In another words, java is portable
because the same java program can be executed in multiple platforms without making any
changes in the source code. You just need to write the java code for one platform and the same
program will run in any platforms. But how does Java make this possible?
As we discussed early, first the Java code is compiled by the Java compiler and generates the
bytecode. This bytecode will be stored in class files. Java Virtual Machine (JVM) is unique for
each platform. Though JVM is unique for each platform, all interpret the same bytecode and
convert it into machine code required for its own platform and this machine code will be directly
executed by the machine in which java program runs. This makes Java platform independent
and portable.
Let’s make it more clear with the help of the following diagram. Here the same compiled Java
bytecode is interpreted by two different JVMS to make it run in Windows and Linux platforms.
Java Runtime Environment contains JVM, class libraries and other supporting components.
As you know the Java source code is compiled into bytecode by Java compiler. This bytecode
will be stored in class files. During runtime, this bytecode will be loaded, verified and JVM
interprets the bytecode into machine code which will be executed in the machine in which the
Java program runs.
These tasks are described in detail in the subsequent sessions.A detailed Java architecture can be
drawn as given below.
JavaScript
Although best known for its use in websites (as client-side JavaScript), JavaScript is also
used to enable scripting access to objects embedded in other applications. The key design
principles within JavaScript are inherited from the Self and Scheme programming languages.
Back End
SQL Server Express is a free version of Microsoft’s primary relational database management
system (RDBMS) – the SQL Server. Essentially, the SQL Server is a database management
system that can be used to store and access the information stored in many different databases.
SQL Server comes with an impressive range of features like business intelligence, reporting, and
in-depth advanced analytics.
Microsoft does, however, offer SQL Server in some different editions including:
SQL Server Express is the most basic offering available. It is a full database engine you
can deploy to a server or embed into an application. Express is free and comes with many of the
same features as the enterprise edition. SQL Server Express is probably most suited to supporting
production applications for smaller to midsize businesses.
• Free: One huge advantage of SQL Server Express is that it is free. Your only outlay is the
time investment you make downloading and setting up the system. If you only want to learn how
to use SQL Server, then Express is for you. There is nothing to lose by downloading the system
and getting used to how it works.
• Scalability: SQL Server Express is an ideal starting point for smaller independent
software vendors (ISVs) since it can be used with any smaller application. The licensing allows
Express to be included as part of an app or product. While there are limitations on memory and
socket usage, they are not as restrictive as some might think. Express is not limited to a single
user which is a commonly held misconception. There is a 10GB database restriction, but that is a
maximum size per database meaning you can have multiple databases that store up to 10GB of
data. If you are an ISV and your company experiences high growth rate resulting in increased
database demands, then you can only upgrade to a paid version of SQL Server.
• Security: Within SQL Server Express there is the option of free online backup that will
help to protect your valuable business data if anything goes wrong. Administrators should still
follow security best practices like restricting access to backup folders and following Windows
password policies.
• Features: While Express is the “lite” version of SQL Server, there is still an impressive
range of features that you would have to pay for with other systems.
Express supports Full-Text Search, native XML, and the SQL Common Language Other key
features include a reporting component and report designer enabling custom report creation.
• Before deploying SQL Server Express, you should make yourself aware of
its limitations which include:
SQL Server 2016 SP1 Express: This is the core express offering and comes with the features
we have already laid out. In addition, capabilities like dynamic data masking and row-level
security are now available in Express.
SQL Server 2016 Express with Advanced Services: This edition of Express contains the most
features. Included are the relational database engine, Management Studio, reporting, and full-text
search. Ideal for developers working on smaller applications which need to implement reporting
on their applications.
SQL Server 2016 Express Local DB: This edition is mainly used as a development tool. It is a
lighter version of Express that runs as a local app. It does support all the main programmability
features of the other editions. The big advantage of Local DB for developers is that it allows
them to create a local environment that is much easier to install and manage. Users can just start
up an instance of Local DB runtime as they need it and do not need to install a service.
Library is a place where all kind of books are available; The collection of knowledge in an
institution is library. The library usually contains the information physically or digitized method.
Library management system consists of list of records about the management of the student
detail, book details and its transaction performance. The ELMS project is developing a
computerized system in library management. As the modern organizations are computerized,
This ELMS helps become essential for human being, commodity and computers in modern
organization Student login page where student can find books issued by him/her and date of
return. After computerized system is implemented less human force will be required to maintain
the library thus reducing the overall cost. A search column to search availability of books. A
staff login page where teacher can add any events being organized in the college and important
suggestions regarding books. And the system also checks the eligible students. Student has the
limitations for barrow books. Student can check the available book via online. Students have to
register before using in the system. . This application is a proof-of-concept visual system
designed to assist readers with finding shelved books in library. This system helps to remind the
students to return book and also intimate the fine amount. The fine amount will be increased day
by day according to college rules.
MODULES
Admin
• Login
• Add Book Details
• Book Allotment
• Book Maintenance
• Student Registration
• Fine Module
• Location Details
• Student Details
Student
• Login
• Search module
• Location Details
• Notification
MODULE DESCRIPTION
Admin/ Librarian
• Login
In this module, the admin can login the system using his/her username and password.
• Add Book Details
In this module contains various facilities like add new book and search book. In the ‘add
new book’ section if any new book comes in the library then the librarian can add its
specifications. Similarly if the user wants to search for a specific book then he/she can
use search book option to do it. In this module admin enter the available book details in
the library.
• Book Allotment
In this module used allot the book to appropriate department. Department details and
book details are maintain by admin.
• Book Maintenance
Book maintenance module allows the member to view the book currently they have
borrowed and also view the book they have borrowed. Not only that, there got reservation
module which allow member to reserve book. Members are allowing reserving book and
deleting the reservation and also view currently the book they reserve.
• Student Registration
Allow the administrator to register new student and update the student records. Student
record details contain ID card image, id number, student name, department, phone
number
• Student Details
In this module user can view the registered student details. And their barrowed book
details.
• Fine Calculation
In this module used to maintain the fine. The student has returned a book on date
otherwise the fine was calculated and increased day by day.
• Location Details
In this module used to add the details about location of the book in track. The information
posted by admin.
Student
• Login
This module is used by user and also admin user for the website. They need to login to
the website using their id and password. In order to distinguish the user’s level, user can
access to different module when successfully login. Student also precedes their ID card
image for verification.
• Search Module
Search Module allow user or guess who visit website to search the book. Not only that
the user allow viewing the details of the book and also seeing the request of the book.
There are a few of type allow users to search. They can search via ISBN, book title and
author.
• Location Details
In this module used to view the details about location of the book in track. The
information posted by admin.
• Notification
Notification sends to student for remaining the return date of the book. Member Expired
report is to view the student’s is date expired via which date, month or year. So they can
remind their student to return the book. Student can also view their fine amount on their
dash board.
DESIGN
3.1 DATA FLOW DIAGRAM
A two-dimensional diagram explains how data is processed and transferred in a system. The
graphical depiction identifies each source of data and how it interacts with other data sources to
reach a common output. Individuals seeking to draft a data flow diagram must identify external
inputs and outputs, determine how the inputs and outputs relate to each other, and explain with
graphics how these connections relate and what they result in. This type of diagram helps
business development and design teams visualize how data is processed and identify or improve
certain aspects.
Level 0 DFD
The Level 0 DFD shows how the system is divided into 'sub-systems' (processes), each of
which deals with one or more of the data flows to or from an external agent, and which together
provide all of the functionality of the system as a whole. It also identifies internal data stores that
must be present in order for the system to do its job, and shows the flow of data between the
various parts of the system.
Level 1 DFD
The next stage is to create the Level 1 Data Flow Diagram. This highlights the main functions
carried out by the system. As a rule, to describe the system was using between two and seven
functions - two being a simple system and seven being a complicated system. This enables us to
keep the model manageable on screen or paper.
Level 2 DFD
A Data Flow Diagram (DFD) tracks processes and their data paths within the business or
system boundary under investigation. A DFD defines each domain boundary and illustrates the
logical movement and transformation of data within the defined boundary. The diagram shows
'what' input data enters the domain, 'what' logical processes the domain applies to that data, and
'what' output data leaves the domain. Essentially, a DFD is a tool for process modeling and one
of the oldest.
The logical model concentrates on the data requirements and the data to be stored independent
of physical considerations. It does not concern itself with how the data will be stored or where it
will be stored physically.
The physical data design model involves translating the logical design of the database onto
physical media using hardware resources and software systems such as database management
systems (DBMS).
Table name: book
Field Type Null Default
id int(5) Yes NULL
book varchar(30) Yes NULL
title varchar(50) Yes NULL
author varchar(30) Yes NULL
date varchar(20) Yes NULL
publishe varchar(30) Yes NULL
r
price varchar(20) Yes NULL
count varchar(10) Yes NULL
location varchar(100) Yes NULL
img varchar(50) Yes NULL
IMPLEMENTATION
4.1 SOURCE CODE
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Library_Management;
import java.awt.Dimension;
import java.awt.Toolkit;
/**
*
* @author ZI Zohir
*/
public class Home extends javax.swing.JFrame {
/**
* Creates new form Home
*/
public Home() {
initComponents();
Toolkit toolkit = getToolkit();
Dimension size = toolkit.getScreenSize();
setLocation(size.width/2 - getWidth()/2, size.height/2 - getHeight()/2);
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-
BEGIN:initComponents
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Main Menu");
setBackground(new java.awt.Color(0, 204, 204));
jLabel2.setText("Welcome");
jLabel3.setText("to");
jLabel4.setText(" Library");
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFact
ory.createLineBorder(new java.awt.Color(102, 255, 204)), "Action",
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1,
24), new java.awt.Color(255, 102, 102))); // NOI18N
btnrbook.setText("Return Book");
btnrbook.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnrbookActionPerformed(evt);
}
});
btnibook.setText("Issue Book");
btnibook.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnibookActionPerformed(evt);
}
});
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(btnibook, javax.swing.GroupLayout.PREFERRED_SIZE, 175,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(btnrbook, javax.swing.GroupLayout.PREFERRED_SIZE, 175,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(btnibook, javax.swing.GroupLayout.PREFERRED_SIZE, 73,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnrbook, javax.swing.GroupLayout.PREFERRED_SIZE, 73,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(23, Short.MAX_VALUE))
);
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFact
ory.createLineBorder(new java.awt.Color(102, 255, 102)), "Operation",
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1,
24), new java.awt.Color(0, 102, 204))); // NOI18N
btnstatistics.setText("Statistics");
btnstatistics.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnstatisticsActionPerformed(evt);
}
});
btnnewstudent.setText("New Student");
btnnewstudent.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnnewstudentActionPerformed(evt);
}
});
btnnewbook.setText("New Book");
btnnewbook.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnnewbookActionPerformed(evt);
}
});
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(btnnewbook, javax.swing.GroupLayout.PREFERRED_SIZE,
175, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(btnstatistics, javax.swing.GroupLayout.PREFERRED_SIZE,
175, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(btnnewstudent, javax.swing.GroupLayout.PREFERRED_SIZE,
175, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(62, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(btnnewbook, javax.swing.GroupLayout.PREFERRED_SIZE,
65, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnstatistics, javax.swing.GroupLayout.PREFERRED_SIZE,
65, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnnewstudent,
javax.swing.GroupLayout.PREFERRED_SIZE, 62,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(29, Short.MAX_VALUE))
);
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel4Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.TRAILING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(21, 21, 21))
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel4Layout.createSequentialGroup()
.addGap(32, 32, 32)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(41, 41, 41)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(106, Short.MAX_VALUE))
);
jMenu1.setText("File");
miexit.setText("Exit");
miexit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
miexitActionPerformed(evt);
}
});
jMenu1.add(miexit);
milogout.setText("Logout");
milogout.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
milogoutActionPerformed(evt);
}
});
jMenu1.add(milogout);
jMenuBar1.add(jMenu1);
jMenu2.setText("Edit");
miabout.setText("About");
jMenu2.add(miabout);
jMenuBar1.add(jMenu2);
setJMenuBar(jMenuBar1);
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and
feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEV
ERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEV
ERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEV
ERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEV
ERE, null, ex);
}
//</editor-fold>
import DAO.DatabaseHelper;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import javax.swing.JOptionPane;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author angel jude suarez
*/
public class Login extends javax.swing.JFrame {
Connection con = null;
ResultSet rs = null;
PreparedStatement ps = null;
/**
* Creates new form Login
*/
public Login() {
initComponents();
con = DatabaseHelper.getConnection();
Toolkit toolkit = getToolkit();
Dimension size = toolkit.getScreenSize();
setLocation(size.width/2 - getWidth()/2, size.height/2 - getHeight()/2);
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-
BEGIN:initComponents
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Login");
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Login",
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1,
18), new java.awt.Color(0, 102, 102))); // NOI18N
txtpassword.setText("admin");
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.LEADING)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE,
60, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel2))
.addGap(29, 29, 29)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.LEADING, false)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(btnlogin)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNR
ELATED)
.addComponent(btnsignup))
.addComponent(txtpassword)
.addComponent(txtuname)))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel3)
.addGap(27, 27, 27)
.addComponent(btnforgot)))
.addContainerGap(12, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel1)
.addComponent(txtuname, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel2)
.addComponent(txtpassword, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(btnlogin)
.addComponent(btnsignup))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(btnforgot)
.addComponent(jLabel3))
.addContainerGap())
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void btnsignupActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
FIRST:event_btnsignupActionPerformed
Signup si = new Signup();
si.setVisible(true);
this.dispose();
}//GEN-LAST:event_btnsignupActionPerformed
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and
feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVE
RE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVE
RE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVE
RE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVE
RE, null, ex);
}
//</editor-fold>
import DAO.DatabaseHelper;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import javax.swing.JOptionPane;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author ZI Zohir
*/
public class Forgot extends javax.swing.JFrame {
Connection con = null;
ResultSet rs = null;
PreparedStatement ps = null;
/**
* Creates new form Forgot
*/
public Forgot() {
initComponents();
con = DatabaseHelper.getConnection();
Toolkit toolkit = getToolkit();
Dimension size = toolkit.getScreenSize();
setLocation(size.width/2 - getWidth()/2, size.height/2 - getHeight()/2);
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-
BEGIN:initComponents
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Forgot Password");
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Forgot
Password", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1,
18), new java.awt.Color(255, 0, 0))); // NOI18N
txtname.setEditable(false);
txtname.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
txtsques.setEditable(false);
txtsques.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.LEADING)
.addComponent(jLabel3)
.addComponent(jLabel4)
.addComponent(jLabel5))
.addGap(9, 9, 9)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.LEADING)
.addComponent(txtanswer,
javax.swing.GroupLayout.PREFERRED_SIZE, 140,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txtpassword,
javax.swing.GroupLayout.PREFERRED_SIZE, 140,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txtsques, javax.swing.GroupLayout.PREFERRED_SIZE,
204, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.LEADING)
.addComponent(jLabel1)
.addComponent(jLabel2))
.addGap(80, 80, 80)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.LEADING)
.addComponent(txtuname,
javax.swing.GroupLayout.PREFERRED_SIZE, 140,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txtname, javax.swing.GroupLayout.PREFERRED_SIZE,
140, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING, false)
.addComponent(btnretrive, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btnsearch)
.addComponent(btnback, javax.swing.GroupLayout.PREFERRED_SIZE, 75,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel1)
.addComponent(txtuname, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnsearch))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel2)
.addComponent(txtname, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel3)
.addComponent(txtsques, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel4)
.addComponent(txtanswer, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnretrive))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel5)
.addComponent(txtpassword, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnback))
.addContainerGap())
);
pack();
}// </editor-fold>//GEN-END:initComponents
java.util.logging.Logger.getLogger(Forgot.class.getName()).log(java.util.logging.Level.SEV
ERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Forgot.class.getName()).log(java.util.logging.Level.SEV
ERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Forgot.class.getName()).log(java.util.logging.Level.SEV
ERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Forgot.class.getName()).log(java.util.logging.Level.SEV
ERE, null, ex);
}
//</editor-fold>
import DAO.DatabaseHelper;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.Random;
import javax.swing.JOptionPane;
/**
*
* @author ZI Zohir
*/
public class NewBook extends javax.swing.JFrame {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("New Book");
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFact
ory.createLineBorder(new java.awt.Color(0, 204, 102)), "New Book",
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1,
18), new java.awt.Color(0, 153, 153))); // NOI18N
btnback.setText("Back");
btnback.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnbackActionPerformed(evt);
}
});
btnadd.setText("Add");
btnadd.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnaddActionPerformed(evt);
}
});
txtbid.setEditable(false);
txtbid.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.LEADING)
.addComponent(jLabel1)
.addComponent(jLabel2)
.addComponent(jLabel3)
.addComponent(jLabel4)
.addComponent(jLabel5)
.addComponent(jLabel6))
.addGap(34, 34, 34)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.LEADING)
.addComponent(txtpub)
.addComponent(txtprice)
.addComponent(txtstock)
.addComponent(txtbid, javax.swing.GroupLayout.PREFERRED_SIZE,
170, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txtname)
.addComponent(cmbedition, 0,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(109, 109, 109)
.addComponent(btnadd)
.addGap(18, 18, 18)
.addComponent(btnback)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATE
D, 23, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel1)
.addComponent(txtbid, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel2)
.addComponent(txtname, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel3)
.addComponent(cmbedition, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel4)
.addComponent(txtpub, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel5)
.addComponent(txtprice, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel6)
.addComponent(txtstock, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(btnadd, javax.swing.GroupLayout.PREFERRED_SIZE, 31,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnback, javax.swing.GroupLayout.PREFERRED_SIZE, 31,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and
feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(NewBook.class.getName()).log(java.util.logging.Level.S
EVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(NewBook.class.getName()).log(java.util.logging.Level.S
EVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(NewBook.class.getName()).log(java.util.logging.Level.S
EVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(NewBook.class.getName()).log(java.util.logging.Level.S
EVERE, null, ex);
}
//</editor-fold>
import DAO.DatabaseHelper;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import javax.swing.JOptionPane;
/**
*
* @author ZI Zohir
*/
public class Return extends javax.swing.JFrame {
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-
BEGIN:initComponents
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Return Book");
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFact
ory.createLineBorder(new java.awt.Color(204, 204, 255)), "Return Book",
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1,
24), new java.awt.Color(204, 0, 153))); // NOI18N
txtcourse.setEditable(false);
txtstock.setEditable(false);
txtstock.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
txtsemister.setEditable(false);
txtbid.setEditable(false);
txtbid.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
txtbname.setEditable(false);
txtbname.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
txtedition.setEditable(false);
txtedition.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
btnsearch.setText("Search");
btnsearch.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnsearchActionPerformed(evt);
}
});
txtbranch.setEditable(false);
txtfname.setEditable(false);
txtsname.setEditable(false);
txtprice.setEditable(false);
txtprice.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
txtdoi.setEditable(false);
txtyear.setEditable(false);
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING)
.addComponent(jLabel8)
.addComponent(jLabel10)
.addComponent(jLabel11)
.addComponent(jLabel12)
.addComponent(jLabel13)
.addComponent(jLabel9)
.addComponent(jLabel7))
.addGap(31, 31, 31)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.TRAILING, false)
.addComponent(txtyear, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtsid, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtsname, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtfname, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtsemister)
.addComponent(txtbranch)
.addComponent(txtcourse, javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.PREFERRED_SIZE, 192,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addComponent(btnsearch)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
44, Short.MAX_VALUE)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING)
.addComponent(jLabel1)
.addComponent(jLabel2)
.addComponent(jLabel3)
.addComponent(jLabel4)
.addComponent(jLabel5)
.addComponent(jLabel6)
.addComponent(jLabel14))
.addGap(34, 34, 34)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING, false)
.addComponent(txtdoi)
.addComponent(txtprice)
.addComponent(txtpub)
.addComponent(txtedition)
.addComponent(txtbname)
.addComponent(txtbid)
.addComponent(txtstock, javax.swing.GroupLayout.PREFERRED_SIZE, 170,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.BASELINE)
.addComponent(jLabel8)
.addComponent(txtsid, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnsearch))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.BASELINE)
.addComponent(jLabel10)
.addComponent(txtsname,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.BASELINE)
.addComponent(jLabel11)
.addComponent(txtfname,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.LEADING)
.addComponent(jLabel12)
.addComponent(txtcourse,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.BASELINE)
.addComponent(jLabel13)
.addComponent(txtbranch,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.BASELINE)
.addComponent(jLabel9)
.addComponent(txtyear, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.BASELINE)
.addComponent(jLabel7)
.addComponent(txtsemister,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.BASELINE)
.addComponent(jLabel1)
.addComponent(txtbid, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.BASELINE)
.addComponent(jLabel2)
.addComponent(txtbname,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.BASELINE)
.addComponent(jLabel3)
.addComponent(txtedition,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.BASELINE)
.addComponent(jLabel4)
.addComponent(txtpub, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.BASELINE)
.addComponent(jLabel5)
.addComponent(txtprice, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.BASELINE)
.addComponent(jLabel6)
.addComponent(txtstock, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.BASELINE)
.addComponent(jLabel14)
.addComponent(txtdoi, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))))
.addContainerGap())
);
btnreturn.setText("Return");
btnreturn.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnreturnActionPerformed(evt);
}
});
btnback.setText("Back");
btnback.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnbackActionPerformed(evt);
}
});
pack();
setLocationRelativeTo(null);
}// </editor-fold>//GEN-END:initComponents
rs.close();
ps.close();
} else {
JOptionPane.showMessageDialog(null, "Student ID not found");
}
} catch (Exception e) {
JOptionPane.showMessageDialog(null, e);
} finally {
try {
rs.close();
ps.close();
} catch (Exception e) {
JOptionPane.showMessageDialog(null, e);
}
}
}//GEN-LAST:event_btnsearchActionPerformed
java.util.logging.Logger.getLogger(Return.class.getName()).log(java.util.logging.Level.SEV
ERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Return.class.getName()).log(java.util.logging.Level.SEV
ERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Return.class.getName()).log(java.util.logging.Level.SEV
ERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Return.class.getName()).log(java.util.logging.Level.SEV
ERE, null, ex);
}
//</editor-fold>
import DAO.DatabaseHelper;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.swing.JOptionPane;
/**
*
* @author ZI Zohir
*/
public class Issue extends javax.swing.JFrame {
/**
* Creates new form Issue
*/
public Issue() {
initComponents();
con = DatabaseHelper.getConnection();
Toolkit toolkit = getToolkit();
Dimension size = toolkit.getScreenSize();
setLocation(size.width/2 - getWidth()/2, size.height/2 - getHeight()/2);
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-
BEGIN:initComponents
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Issue Book");
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFact
ory.createLineBorder(new java.awt.Color(0, 204, 102)), "Book Details",
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1,
18), new java.awt.Color(204, 204, 0))); // NOI18N
txtprice.setEditable(false);
txtprice.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
txtstock.setEditable(false);
txtstock.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
txtpub.setEditable(false);
txtpub.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
txtbname.setEditable(false);
txtbname.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
txtedition.setEditable(false);
txtedition.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
btnbsearch.setText("Search");
btnbsearch.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnbsearchActionPerformed(evt);
}
});
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING)
.addComponent(jLabel1)
.addComponent(jLabel2)
.addComponent(jLabel3)
.addComponent(jLabel4)
.addComponent(jLabel5)
.addComponent(jLabel6))
.addGap(34, 34, 34)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.TRAILING, false)
.addComponent(txtprice, javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)
.addComponent(txtpub, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtedition, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtbname, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtbid, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtstock))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
17, Short.MAX_VALUE)
.addComponent(btnbsearch)
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel1)
.addComponent(txtbid, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnbsearch))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel2)
.addComponent(txtbname, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel3)
.addComponent(txtedition, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel4)
.addComponent(txtpub, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel5)
.addComponent(txtprice, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel6)
.addComponent(txtstock, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
);
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFact
ory.createLineBorder(new java.awt.Color(255, 255, 102)), "Student Details",
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1,
18))); // NOI18N
jLabel7.setText("Semister");
jLabel8.setText("Student ID");
txtsname.setEditable(false);
jLabel9.setText("Year");
txtbranch.setEditable(false);
jLabel10.setText("Name");
txtfname.setEditable(false);
jLabel11.setText("Father's Name");
jLabel12.setText("Course");
jLabel13.setText("Branch");
txtcourse.setEditable(false);
txtyear.setEditable(false);
txtsemister.setEditable(false);
btnssearch.setText("Search");
btnssearch.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnssearchActionPerformed(evt);
}
});
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING)
.addComponent(jLabel8)
.addComponent(jLabel10)
.addComponent(jLabel11)
.addComponent(jLabel12)
.addComponent(jLabel13)
.addComponent(jLabel9)
.addComponent(jLabel7))
.addGap(31, 31, 31)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.TRAILING, false)
.addComponent(txtyear, javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, 192, Short.MAX_VALUE)
.addComponent(txtsid, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtsname, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtfname, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtsemister)
.addComponent(txtbranch)
.addComponent(txtcourse, javax.swing.GroupLayout.Alignment.LEADING))
.addGap(18, 18, 18)
.addComponent(btnssearch)
.addContainerGap(12, Short.MAX_VALUE))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel8)
.addComponent(txtsid, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnssearch))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel10)
.addComponent(txtsname, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel11)
.addComponent(txtfname, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING)
.addComponent(jLabel12)
.addComponent(txtcourse, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel13)
.addComponent(txtbranch, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel9)
.addComponent(txtyear, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel7)
.addComponent(txtsemister, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
);
jLabel14.setText("Date of Issue");
btnissue.setText("Issue");
btnissue.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnissueActionPerformed(evt);
}
});
btnback.setText("Back");
btnback.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnbackActionPerformed(evt);
}
});
pack();
setLocationRelativeTo(null);
}// </editor-fold>//GEN-END:initComponents
private void btnbackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
FIRST:event_btnbackActionPerformed
Home ob = new Home();
ob.setVisible(true);
this.dispose();
}//GEN-LAST:event_btnbackActionPerformed
java.util.logging.Logger.getLogger(Issue.class.getName()).log(java.util.logging.Level.SEVE
RE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Issue.class.getName()).log(java.util.logging.Level.SEVE
RE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Issue.class.getName()).log(java.util.logging.Level.SEVE
RE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Issue.class.getName()).log(java.util.logging.Level.SEVE
RE, null, ex);
}
//</editor-fold>
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Library_Management;
import DAO.DatabaseHelper;
import java.sql.Connection;
import javax.swing.JOptionPane;
/**
*
* @author ZI Zohir
*/
public class Loading extends javax.swing.JFrame implements Runnable {
Connection con;
int s=0;
Thread th;
/**
* Creates new form Loading
*/
public Loading() {
initComponents();
con = DatabaseHelper.getConnection();
th = new Thread((Runnable)this);
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-
BEGIN:initComponents
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Loding");
jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new
java.awt.Color(153, 153, 255)));
jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/book
loading.png"))); // NOI18N
jLabel2.setText("Please wait...");
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.A
lignment.LEADING)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE,
254, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(45, 45, 45)
.addComponent(jProgressBar1,
javax.swing.GroupLayout.PREFERRED_SIZE, 160,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(95, 95, 95)
.addComponent(jLabel2))))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(80, 80, 80)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE,
110, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1)
.addGap(55, 55, 55)
.addComponent(jProgressBar1, javax.swing.GroupLayout.PREFERRED_SIZE,
29, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED
)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 99,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and
feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(Loading.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Loading.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Loading.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Loading.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
}
//</editor-fold>
import DAO.DatabaseHelper;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import javax.swing.JOptionPane;
import net.proteanit.sql.DbUtils;
/**
*
* @author ZI Zohir
*/
public class Statistics extends javax.swing.JFrame {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Statistics");
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFact
ory.createLineBorder(new java.awt.Color(0, 0, 0)), "Issue Details",
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1,
18), new java.awt.Color(0, 102, 102))); // NOI18N
tblissue.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
jScrollPane1.setViewportView(tblissue);
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE,
664, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE,
150, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFact
ory.createLineBorder(new java.awt.Color(0, 0, 0)), "Return Details",
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1,
18), new java.awt.Color(0, 102, 102))); // NOI18N
tblreturn.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
jScrollPane2.setViewportView(tblreturn);
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE,
664, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE,
150, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jButton1.setText("Back");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
pack();
setLocationRelativeTo(null);
}// </editor-fold>//GEN-END:initComponents
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and
feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(Statistics.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Statistics.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Statistics.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Statistics.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
}
//</editor-fold>
import DAO.DatabaseHelper;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.Random;
import javax.swing.JOptionPane;
/**
*
* @author ZI Zohir
*/
public class Student extends javax.swing.JFrame {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("New Student");
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFact
ory.createLineBorder(new java.awt.Color(102, 255, 51)), "New Student",
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1,
24), new java.awt.Color(204, 51, 0))); // NOI18N
jLabel7.setText("Semister");
txtsid.setEditable(false);
txtsid.setText("2");
txtname.setText("nar");
btnregister.setText("Register");
btnregister.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnregisterActionPerformed(evt);
}
});
btnback.setText("Back");
btnback.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnbackActionPerformed(evt);
}
});
jLabel6.setText("Year");
txtbranch.setText("musir");
jLabel2.setText("Name");
txtfname.setText("san");
jLabel3.setText("Father's Name");
jLabel4.setText("Course");
jLabel5.setText("Branch");
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING)
.addComponent(jLabel1)
.addComponent(jLabel2)
.addComponent(jLabel3)
.addComponent(jLabel4)
.addComponent(jLabel5)
.addComponent(jLabel6)
.addComponent(jLabel7))
.addGap(31, 31, 31)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alig
nment.LEADING, false)
.addComponent(txtsid)
.addComponent(txtname)
.addComponent(txtfname)
.addComponent(cmbcourse, 0, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(txtbranch)
.addComponent(cmbyear, 0, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(cmbsemister,
javax.swing.GroupLayout.PREFERRED_SIZE, 180,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(10, 10, 10)
.addComponent(btnregister)
.addGap(18, 18, 18)
.addComponent(btnback, javax.swing.GroupLayout.PREFERRED_SIZE,
70, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel1)
.addComponent(txtsid, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel2)
.addComponent(txtname, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel3)
.addComponent(txtfname, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel4)
.addComponent(cmbcourse, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel5)
.addComponent(txtbranch, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel6)
.addComponent(cmbyear, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel7)
.addComponent(cmbsemister, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(btnregister, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btnback, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and
feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(Student.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Student.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Student.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Student.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Student().setVisible(true);
}
});
}
import DAO.DatabaseHelper;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import javax.swing.JOptionPane;
import net.proteanit.sql.DbUtils;
/**
*
* @author ZI Zohir
*/
public class Statistics extends javax.swing.JFrame {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Statistics");
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFact
ory.createLineBorder(new java.awt.Color(0, 0, 0)), "Issue Details",
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1,
18), new java.awt.Color(0, 102, 102))); // NOI18N
tblissue.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
jScrollPane1.setViewportView(tblissue);
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE,
664, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE,
150, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFact
ory.createLineBorder(new java.awt.Color(0, 0, 0)), "Return Details",
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1,
18), new java.awt.Color(0, 102, 102))); // NOI18N
tblreturn.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
jScrollPane2.setViewportView(tblreturn);
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE,
664, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE,
150, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jButton1.setText("Back");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
pack();
setLocationRelativeTo(null);
}// </editor-fold>//GEN-END:initComponents
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and
feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(Statistics.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Statistics.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Statistics.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Statistics.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
}
//</editor-fold>
UNIT TESTING
The first test in the development process is the unit test. The source code is normally divided into
modules, which in turn are divided into smaller units called units. These units have specific
behavior. The test done on these units of code is called unit test. Unit test depends upon the
language on which the project is developed. Unit tests ensure that each unique path of the project
performs accurately to the documented specifications and contains clearly defined inputs and
expected results. Functional and reliability testing in an Engineering environment. Producing
tests for the behavior of components (nodes and vertices) of a product to ensure their correct
behavior prior to system integration.
INTEGRATION TESTING
Testing in which modules are combined and tested as a group. Modules are typically code
modules, individual applications, source and destination applications on a network, etc.
Integration Testing follows unit testing and precedes system testing. Testing after the product is
code complete. Betas are often widely distributed or even distributed to the public at large in
hopes that they will buy the final product when it is release.
VALIDATION TESTING
Valid and invalid data should be created and the program should be made to process this data to
catch errors. When the user of each module wants to enter into the page by the login page using
the use rid and password .If the user gives the wrong password or use rid then the information is
provided to the user like “you must enter user id and password”. Here the inputs given by the
user are validated. That is password validation, format of date are correct, textbox validation.
Changes that need to be done after result of this testing.
CONCLUSION
The Books and Students are given a particular unique id no. So that they can be accessed
correctly and without errors. Our main aim of the project is to get the correct information about a
particular student and books available in the library. The problems, which existed in the earlier
system, have been removed to a large extent. And it is expected that this project will go a long
way in satisfying user’s requirements. The computerization of the Library Management will not
only improves the efficiency but will also reduce human stress thereby indirectly improving
human recourses.
BIBLIOGRAPHY
BOOK REFERENCES
WEBSITE REFERENCES
• www.ntu.edu.sg
• www.tutorialspoint.com
• www.javaworld.com
• www.edureka.co
• www.java.net