Library Management System
January 6, 2017 | Author: meghait26 | Category: N/A
Short Description
Download Library Management System...
Description
PROJECTT R EPORT
Library L y Manaagemen nt Systtem
Unde er guida ance of o Prof. Vinayak Panda | Me egha Ku umari
Library Management System
A Project Report On
“Library Management System” Submitted in partial fulfillment of The requirements for the award of the 7th Semester of
BACHELOR OF TECHNOLOGY IN Information Technology By MEGHA KUMARI (1001210535) Under the esteemed guidance of
Prof. Vinayak Panda
DEPARTMMENT OF INFORMATION TECHNOLOGY
GANDHI INSTITUTE OF ENGINEERING AND TECHNOLOGY GUNUPUR – 765022
2013‐14
Department of Information Technology, GIET, Gunupur
Library Management System
Department of Information Technology, GIET, Gunupur
Library M Managemen nt System
Departm ment of Informaation Technologgy
CER RTIFIC CATE
This T is to certiffy that the projject worrk entitleed “Library M Managem ment Sysstem” is done byy MEGHA A KUMA ARI, Regd d. No .10001210535 in partiall fulfillm ment of the requuirementss for the award of o the deegree off Bacheloor of Tecchnology y in d thhe acadeemic year 2013 3-14. Thhis workk is Infformationn Technnology during sub bmitted to the deppartment as a partt of evaluuation off 7th Semester Prooject.
(Pro of. Vianayakk Panda ) Project Superrvisor
Department of Information TTechnology, GIET, Gunup pur
(Proff.(Dr.)PRAG GNYABAN MISHRA) M H..O.D, IT
Library Management System
ACKNOWLEDGEMENT
The completion of this project consists of precious guidance and direction of many people and hence in order to pay my respect, I would like to acknowledge all of them.
My primary obligation goes to the Gandhi Institute for giving me the golden opportunity to work in an environment extremely conducive for learning and helping to gain an insight into the actual working of an organisation.
I am grateful to Prof. “ Vinayak Panda ” for making our work interesting and exciting by giving valuable guidance, encouragement, motivation and concrete support. Despite having a busy schedule he was always ready to spare time and give innovative technical assistance throughout the development on the project. Last but not the least I would like to thank my family and friends whose silent support helped me through the making of the project.
Department of Information Technology, GIET, Gunupur
Library Management System
ABSTRACT
In this project we have attempted to create an environment where people can keep in contact with each other on the internet easily. People living at various places in the world can spend some quality time together exchanging messages.
Our vision is to bring people close even after being located at furthest points on earth. They can sit together and enjoy exchanging ideas and their views, comments and revive the old times together, or make new friends and have fun with them.
The world is getting faster day by day, people do not have time to travel to the places where their loved ones live. Instead, they use communication mediums like telephone, VOIP, emails, letters and so on to keep in touch. Technology has grown up to the extent that communication constraint of one-to-one has been replaced by many-to-many.
Creating a social networking site helps people interact with their friends and also learn new things from people. They can meet new people and acquire information. In short, they open their eyes and ears to the world around them.
Department of Information Technology, GIET, Gunupur
Library Management System
TABLE OF CONTENTS Chapter No.
TITLE
1.
Introduction
2.
System Analysis
PAGE No.
2.1 Existing System 2.2 Proposed System 2.3 Feasibility Analysis
3.
Configuration 3.1 Hardware Configuration 3.2 Software Configuration
4.
System Design and Specification 4.1 High Level Design 4.1.1 Data Flow Diagram 4.1.2 ER Diagram 4.2 Low Level Design 4.2.1 Software Interface 4.3 System Design 4.3.1 Input Design 4.3.2 Output Design 4.3.3 Database Design
5.
System Implementation
6.
Coding 6.1 Sample Coding
7.
System Testing 5.1 Unit Testing 5.2 Integration Testing
8.
Conclusion
Department of Information Technology, GIET, Gunupur
Library Management System
INTRODUCTION
The project titled Library Management System is Library management software for monitoring and controlling the transactions in a library .The project “Library Management System” is developed in java, which mainly focuses on basic operations in a library like adding new member, new books, and updating new information, searching books and members and facility to borrow and return books.
“Library Management System” is a windows application written for Windows operating systems, designed to help users maintain and organize library. Our software is easy to use for both beginners and advanced users. It features a familiar and well thoughtout, an attractive user interface, combined with strong searching Insertion and reporting capabilities. The report generation facility of library system helps to get a good idea of which are the books borrowed by the members, makes users possible to generate reports’ hard copy. The software Library Management System has four main modules.
Insertion to Database Module – User friendly input screen Extracting from Database module – Attractive Output Screen Report Generation module – borrowed book list & Available book list Search Facility system – search for books and members
Department of Information Technology, GIET, Gunupur
Library Management System
SYSTEM ANALYSIS EXISTING SYSTEM: System Analysis is a detailed study of the various operations performed by a system and their relationships within and outside of the system. Here the key question iswhat all problems exist in the present system? What must be done to solve the problem? Analysis begins when a user or manager begins a study of the program using existing system. During analysis, data collected on the various files, decision points and transactions handled by the present system. The commonly used tools in the system are Data Flow Diagram, interviews, etc. Training, experience and common sense are required for collection of relevant information needed to develop the system. The success of the system depends largely on how clearly the problem is defined, thoroughly investigated and properly carried out through the choice of solution. A good analysis model should provide not only the mechanisms of problem understanding but also the frame work of the solution. Thus it should be studied thoroughly by collecting data about the system. Then the proposed system should be analyzed thoroughly in accordance with the needs. System analysis can be categorized into four parts. System planning and initial investigation Information Gathering Applying analysis tools for structured analysis Feasibility study Cost/ Benefit analysis. In our existing system all the transaction of books are done manually, So taking more time for a transaction like borrowing a book or returning a book and also for searching of members and books. Another major disadvantage is that to preparing the list of books borrowed and the available books in the library will take more time, currently it is doing as a one day process for verifying all records. So after conducting the feasibility study we decided to make the manual Library management system to be computerized.
Department of Information Technology, GIET, Gunupur
Library Management System
PROPOSED SYSTEM
Proposed system is an automated Library Management System. Through our software
user can add members, add books, search members, search books, update information, edit information, borrow and return books in quick time. Our proposed system has the following advantages. User friendly interface Fast access to database Less error More Storage Capacity Search facility Look and Feel Environment Quick transaction All the manual difficulties in managing the Library have been rectified by implementing computerization.
Department of Information Technology, GIET, Gunupur
Library Management System
FEASIBILITY ANALYSIS Whatever we think need not be feasible .It is wise to think about the feasibility of any problem we undertake. Feasibility is the study of impact, which happens in the organization by the development of a system. The impact can be either positive or negative. When the positives nominate the negatives, then the system is considered feasible. Here the feasibility study can be performed in two ways such as technical feasibility and Economical Feasibility.
Technical Feasibility: We can strongly says that it is technically feasible, since there will not be much difficulty in getting required resources for the development and maintaining the system as well. All the resources needed for the development of the software as well as the maintenance of the same is available in the organization here we are utilizing the resources which are available already.
Economical Feasibility: Development of this application is highly economically feasible .The organization needed not spend much m one for the development of t he system already available. The only thing is to be done is making an environment for the development with an effective supervision. I f we are doing so , we can attain the maximum usability of the corresponding resources .Even after the development , the organization will not be in a condition to invest more in t he organization .There fore , the system is economically feasible.
Department of Information Technology, GIET, Gunupur
Library Management System
HARDWARE CONFIGURATION Processor
:
Pentium III 630MHz
RAM
:
512 MB
Hard Disk
:
30 GB
Monitor Key Board
:
14” Color monitor :
122 Keys
Department of Information Technology, GIET, Gunupur
Library Management System
SOFTWARE CONFIGURATION
Operating System :
Windows 98, Windows XP, Windows Vista, Windows 7.
Language
:
Java 2 Runtime Environment
Database
:
MS Access 2007
Department of Information Technology, GIET, Gunupur
Library M Managemen nt System
System m Desiggn and Specificcation DA ATA FLOW W DIAGRAM
Department of Information TTechnology, GIET, Gunup pur
Library M Managemen nt System
Department of Information TTechnology, GIET, Gunup pur
Library Management System
E R DIAGRAM
Return date
Book id
Book name
Issue date
Book Author Book Book Category
Reserve By
Reserved Flag
Book return
Status
Book issue to
Usernpasswd
User Id
Department of Information Technology, GIET, Gunupur
Password
Library Management System
NumberOfBooksTaken
User Id
Semester
User name
Gender userdata
Course
Department
adminlog
User Id
Department of Information Technology, GIET, Gunupur
Password
Library Management System
NumberOfBooksTaken
User Id
Semester
User name
Gender
Password
userdata Course Department
usernpass
Access to Password
Borrow by
User Id
Librarian
Issue
User Id
Book Id
Book Author
Return date
Book Category Books
Issue date
Book issue to
Status
Reserve By
Book return
Reserved Flag
Department of Information Technology, GIET, Gunupur
Library M Managemen nt System
S TWAR SOFT RE IN NTERF FACE E Weelcome Page P
Login L Pagge
Department of Information TTechnology, GIET, Gunup pur
Library M Managemen nt System
Admiin Login n Page
Stafff Login Page P
Department of Information TTechnology, GIET, Gunup pur
Library M Managemen nt System
Membeer’s Tab ble Page
All Boook Detail Page
Department of Information TTechnology, GIET, Gunup pur
Library M Managemen nt System
Sea arch Boooks
A Adminst rator Loogin Pagge
Department of Information TTechnology, GIET, Gunup pur
Library M Managemen nt System
Add New User U
Add A Boook
Department of Information TTechnology, GIET, Gunup pur
Library M Managemen nt System
Stafff Login Page P
Department of Information TTechnology, GIET, Gunup pur
Library Management System
SYSTEM DESIGN INPUT DESIGN Input design is the process of converting user-oriented input to a computer based format. Input design is a part of overall system design, which requires very careful attention .Often the collection of input data is the most expensive part of the system. The main objectives of the input design are … 1. Produce cost effective method of input 2. Achieve highest possible level of accuracy 3. Ensure that the input is acceptable to and understood by the staff.
OUTPUT DESIGN Outputs from computer systems are required primarily to communicate the results of processing to users. They are also used to provide a permanent copy of these result for latter consultation .Computer output is the most important and direct source of information to the users. Designing computer output should proceed in an organized well throughout the manner. The right output must be available for the people who find the system easy o use. The outputs have been defined during the logical design stage. If not, they should defined at the beginning of the output designing terms of types of output connect, format, response etc, All screens are informative and interactive in such a way that the user can full fill his requirements through asking queries.
Department of Information Technology, GIET, Gunupur
Library Management System
DATABASE DESIGN The general theme behind a database is to handle information as an integrated whole. A database is a collection of interrelated data stored with minimum redundancy to serve many users quickly and effectively. After designing input and output, the analyst must concentrate on database design or how data should be organized around user requirements. The general objective is to make information access, easy quick, inexpensive and flexible for other users. During database design the following objectives are concerned: Controlled Redundancy Data independence Accurate and integrating More information at low cost Recovery from failure Privacy and security Performance Ease of learning and use
Department of Information Technology, GIET, Gunupur
Library Management System
TABLES USED TABLE NAME: adminlog Field Name
Data Type
Description
User id
Text
Primary Key
Password
Text
‐
Field Name
Data Type
Description
Book Id
Text
Primary Key
Book name
Text
‐
Book Author
Text
‐
Book Category
Text
‐
Book issue to
Text
‐
Status
Number
‐
Book return
Number
‐
Reserved Flag
Number
‐
Reserve By
Text
‐
Issue date
Date
‐
Return date
Date
‐
TABLE NAME: books
Department of Information Technology, GIET, Gunupur
Library Management System
TABLE NAME: usernpasswd
Field Name
Data Type
Description
User Id
Text
Primary Key
Password
Text
‐
Field Name
Data Type
Description
User Id
Text
Primary Key
User name
Text
-
Gender
Text
-
Department
Text
-
Course
Text
-
Semester
Text
-
NumberOfBooksTaken
Text
-
TABLE NAME: userdata
Department of Information Technology, GIET, Gunupur
Library Management System
SYSTEM IMPLEMENTATION
Implementation is the stage in the project where the theoretical design is turned into a working system. The implementation phase constructs, installs and operates the new system. The most crucial stage in achieving a new successful system is that it will work efficiently and effectively. There are several activities involved while implementing a new project they are
End user training
End user Education
Training on the application software
System Design
Parallel Run And To New System
Post implementation Review
END USER TRAINING: The successful implementation of the new system will purely upon the involvement of the officers working in that department. The officers will be imparted the necessary training on the new technology.
END USER EDUCATION: The education of the end user start after the implementation and testing is over. When the system is found to be more difficult to understand and complex, more effort is put to educate the end used to make them aware of the system, giving them lectures about the new system and providing them necessary documents and materials about how the system can do this.
TRAINING OF APPLICATION SOFTWARE: After providing the necessary basic training on the computer awareness, the users will have to be trained upon the new system such as the screen flows and screen design type of help on the screen, type of errors while entering the data , the corresponding validation check at each entry and the way to correct the data entered. It should then cover information needed by the specific user or group to use the system.
Department of Information Technology, GIET, Gunupur
Library Management System
POST IMPLEMENTATION VIEW: The department is planning a method to know the states of the past implementation process. For that regular meeting will be arranged by the concerned officers about the implementation problem and success
Department of Information Technology, GIET, Gunupur
Library Management System
CODING ADMIN LOGIN PAGE SAMPLE CODE
/*NewAccount.java */ import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.sql.*; import javax.swing.table.*; public class adminlog extends javax.swing.JFrame { /** Creates new form NewAccount */ public adminlog() { initComponents(); } /** This method is called from within the constructor to initialize the form*/ private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); userid = new javax.swing.JTextField(); password = new javax.swing.JPasswordField(); update = new javax.swing.JButton(); Department of Information Technology, GIET, Gunupur
Library Management System
finish = new javax.swing.JButton(); getContentPane().setLayout(null); //setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Admin log");
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); jLabel1.setForeground(new java.awt.Color(102, 0, 0)); jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabel1.setText("USER ID:"); getContentPane().add(jLabel1); jLabel1.setBounds(20, 60, 120, 20); jLabel2.setFont(new java.awt.Font("Tahoma", 1, 14)); jLabel2.setForeground(new java.awt.Color(102, 0, 0)); jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabel2.setText("PASSWORD:"); getContentPane().add(jLabel2); jLabel2.setBounds(20, 90, 120, 20); jLabel6.setFont(new java.awt.Font("Tahoma", 1, 18)); jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel6.setText("ADMINISTRATOR LOGIN"); getContentPane().add(jLabel6); jLabel6.setBounds(50, 20, 300, 20); Department of Information Technology, GIET, Gunupur
Library Management System
userid.setFont(new java.awt.Font("Tahoma", 0, 14)); getContentPane().add(userid); userid.setBounds(170, 60, 130, 20); password.setFont(new java.awt.Font("Tahoma", 0, 14)); getContentPane().add(password); password.setBounds(170, 90, 130, 20);
update.setText("LOGIN");
update.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent evt)
{
if( userid.getText().equals(""))
{
JOptionPane.showMessageDialog((Component) null, "Please Enter \n login and password ", "Login Error", JOptionPane.INFORMATION_MESSAGE);
}
else{
//setVisible(false);
//AdminPage ap=new AdminPage();
verifyAdmLogin();
}
}
}); update.setToolTipText("CLICK TO LOGIN"); Department of Information Technology, GIET, Gunupur
Library Management System
getContentPane().add(update); update.setBounds(340, 60, 80, 30); finish.setText("EXIT");
finish.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent evt)
{
setVisible(false);
LogPage llp=new LogPage();
}
}); finish.setToolTipText("CLICK TO EXIT"); getContentPane().add(finish); finish.setBounds(340, 100, 80, 30); pack();
setSize(500,200);
setVisible(true);
setLocation(200,200);
} /** * @param args the command line arguments */ public static void main(String args[]) { adminlog ad=new adminlog(); Department of Information Technology, GIET, Gunupur
Library Management System
} private javax.swing.JButton finish; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel6; private javax.swing.JPasswordField password; private javax.swing.JButton update; private javax.swing.JTextField userid; // End of variables declaration
//******************************************* verify admin login**************************************************
void verifyAdmLogin()
{
Connection con=null;
String url="jdbc:odbc:GIET";
Statement st=null;
try
{
String val1=userid.getText();
val1=val1.trim();
String val2 = (String)password.getText();
val2 = val2.trim();
Department of Information Technology, GIET, Gunupur
Library Management System
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection(url);
st = con.createStatement();
ResultSet rs=st.executeQuery("Select Passwd from adminlog where UserId='"+val1+"'");
while(rs.next()){
String user = rs.getString(1);
System.out.println(user);
boolean b=user.equals(val2);
if(b)
{
setVisible(false);
AdminPage aaa=new AdminPage();
}
else
Department of Information Technology, GIET, Gunupur
Library Management System
{
JOptionPane.showMessageDialog((Component) null, "Invalid password. \n Please enter again. ", "Login Error", JOptionPane.INFORMATION_MESSAGE);
setVisible(false);
adminlog alog=new adminlog();
}
}
}
catch(SQLException ex)
{
System.out.println("Unable to access the database");
}
catch(ClassNotFoundException ex)
{
System.out.println("Class not found");
}
catch(Exception ex)
Department of Information Technology, GIET, Gunupur
Library Management System
{
System.out.println("Exception raised is:"+ex);
}
finally {
con=null;
}
}
}
Department of Information Technology, GIET, Gunupur
Library Management System
STAFF LOGIN PAGE SAMPLE CODE /*NewAccount.java */ import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.sql.*; import javax.swing.table.*; public class stafflog extends javax.swing.JFrame { /** Creates new form NewAccount */ public stafflog() { initComponents(); } private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); userid = new javax.swing.JTextField(); password = new javax.swing.JPasswordField(); update = new javax.swing.JButton(); finish = new javax.swing.JButton(); getContentPane().setLayout(null); Department of Information Technology, GIET, Gunupur
Library Management System
setTitle("STAFF LOG"); jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); jLabel1.setForeground(new java.awt.Color(102, 0, 0)); jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabel1.setText("USER ID:"); getContentPane().add(jLabel1); jLabel1.setBounds(20, 60, 120, 20); jLabel2.setFont(new java.awt.Font("Tahoma", 1, 14)); jLabel2.setForeground(new java.awt.Color(102, 0, 0)); jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabel2.setText("PASSWORD:"); getContentPane().add(jLabel2); jLabel2.setBounds(20, 90, 120, 20); jLabel6.setFont(new java.awt.Font("Tahoma", 1, 18)); jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel6.setText("STAFF LOGIN"); getContentPane().add(jLabel6); jLabel6.setBounds(50, 20, 300, 20); userid.setFont(new java.awt.Font("Tahoma", 0, 14)); getContentPane().add(userid); userid.setBounds(170, 60, 130, 20); password.setFont(new java.awt.Font("Tahoma", 0, 14)); Department of Information Technology, GIET, Gunupur
Library Management System
getContentPane().add(password); password.setBounds(170, 90, 130, 20); update.setText("LOGIN"); update.setToolTipText("CLICK TO LOGIN");
update.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent evt)
{
if( userid.getText().equals(""))
{
JOptionPane.showMessageDialog((Component) null, "Plese Enter \n login and password ", "Login Error", JOptionPane.INFORMATION_MESSAGE);
}
else{
verifystaffLogin();
}
}
});
getContentPane().add(update); update.setBounds(340, 60, 80, 30); Department of Information Technology, GIET, Gunupur
Library Management System
finish.setText("EXIT");
finish.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent evt)
{
LogPage llp=new LogPage();
}
setVisible(false);
}); finish.setToolTipText("CLICK TO EXIT"); getContentPane().add(finish); finish.setBounds(340, 100, 80, 30); pack();
setSize(500,200);
setVisible(true);
setLocation(200,200);
} public static void main(String args[]) { stafflog ad=new stafflog(); } // Variables declaration ‐ do not modify private javax.swing.JButton finish; private javax.swing.JLabel jLabel1; Department of Information Technology, GIET, Gunupur
Library Management System
private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel6; private javax.swing.JPasswordField password; private javax.swing.JButton update; private javax.swing.JTextField userid; // End of variables declaration
void verifystaffLogin()
{
Connection con=null;
String url="jdbc:odbc:GIET";
Statement st=null;
try
{
String val1=userid.getText();
val1=val1.trim();
String val2 = (String)password.getText();
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection(url);
val2 = val2.trim();
Department of Information Technology, GIET, Gunupur
Library Management System
st = con.createStatement();
ResultSet rs=st.executeQuery("Select Passwd from adminlog where UserId='"+val1+"'");
while(rs.next()){
String user = rs.getString(1);
System.out.println(user);
boolean b=user.equals(val2);
if(b)
{
setVisible(false);
LibrarianPage aaa=new LibrarianPage();
}
else
{
Department of Information Technology, GIET, Gunupur
Library Management System
JOptionPane.showMessageDialog((Component) null, "Invalid Login name/password. Please enter again. ", "Login Error", JOptionPane.INFORMATION_MESSAGE);
}
}
}
catch(SQLException ex)
{
System.out.println("Unable to access the database");
}
catch(ClassNotFoundException ex)
{
System.out.println("Class not found");
}
catch(Exception ex)
{
System.out.println("Exception raised is:"+ex);
}
finally {
con=null;
}
Department of Information Technology, GIET, Gunupur
Library Management System
}
}
Department of Information Technology, GIET, Gunupur
Library Management System
LIBRARIAN PAGE SAMPLE CODE // AdminPage.java import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.sql.*; import javax.swing.table.*; public class LibrarianPage extends javax.swing.JFrame { /** Creates new form AdminPage */ public LibrarianPage() { initComponents(); } private void initComponents() { heading = new javax.swing.JLabel(); heading1 = new javax.swing.JLabel(); heading3 = new javax.swing.JLabel(); heading5 = new javax.swing.JLabel(); issuebook = new javax.swing.JButton(); addbooks = new javax.swing.JButton(); deletebooks = new javax.swing.JButton(); reserve = new javax.swing.JButton(); Department of Information Technology, GIET, Gunupur
Library Management System
logout = new javax.swing.JButton(); heading4 = new javax.swing.JLabel(); heading6 = new javax.swing.JLabel(); heading7 = new javax.swing.JLabel(); returnbook = new javax.swing.JButton(); getContentPane().setLayout(null); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("LIBRARIAN PAGE"); setForeground(new java.awt.Color(254, 215, 3)); heading.setFont(new java.awt.Font("Tahoma", 3, 18)); heading.setForeground(new java.awt.Color(102, 0, 0)); heading.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); heading.setText("CENTERAL LIBRARY GIET GUNUPUR."); getContentPane().add(heading); heading.setBounds(380, 20, 310, 30);
heading1.setFont(new java.awt.Font("Tahoma", 3, 14));
heading1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); heading1.setText(" ISSUE BOOK =>"); getContentPane().add(heading1); heading1.setBounds(110, 160, 210, 30); Department of Information Technology, GIET, Gunupur
Library Management System
heading3.setFont(new java.awt.Font("Tahoma", 3, 14)); heading3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); heading3.setText("DELETE BOOK DETAIL =>"); getContentPane().add(heading3); heading3.setBounds(120, 380, 210, 30); heading5.setFont(new java.awt.Font("Tahoma", 3, 14));
heading5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); heading5.setText("RESERVE BOOK =>"); getContentPane().add(heading5); heading5.setBounds(130, 270, 210, 30); issuebook.setText("ISSUE"); issuebook.setToolTipText("Click to create new account");
issuebook.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent evt)
{
}
issue iss=new issue();
}); getContentPane().add(issuebook); issuebook.setBounds(380, 160, 120, 30);
addbooks.setText("ADD NEW BOOK"); Department of Information Technology, GIET, Gunupur
Library Management System
addbooks.setToolTipText("add new boooks");
addbooks.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent evt)
{
//setVisible(false);
NewBook nb=new NewBook();
} }); getContentPane().add(addbooks); addbooks.setBounds(390, 330, 120, 30); deletebooks.setText("DELETE BOOK"); deletebooks.setToolTipText("Delete book");
deletebooks.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent evt)
{
//setVisible(false);
DeleteBook db=new DeleteBook();
} }); getContentPane().add(deletebooks); deletebooks.setBounds(390, 380, 120, 30); Department of Information Technology, GIET, Gunupur
Library Management System
reserve.setText("RESERVE"); reserve.setToolTipText("reserve book");
reserve.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent evt)
{
reservebook rb=new reservebook();
} }); reserve.setFocusPainted(false); getContentPane().add(reserve); reserve.setBounds(380, 270, 120, 30); logout.setFont(new java.awt.Font("Tahoma", 1, 14)); logout.setText("LOGOUT");
logout.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent evt)
{
setVisible(false);
LogPage lp=new LogPage();
}
}); Department of Information Technology, GIET, Gunupur
Library Management System
getContentPane().add(logout); logout.setBounds(550, 450, 100, 50); heading4.setFont(new java.awt.Font("Tahoma", 3, 18)); heading4.setForeground(new java.awt.Color(0, 102, 102)); heading4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); heading4.setText("STAFF PAGE"); getContentPane().add(heading4); heading4.setBounds(30, 20, 310, 30); heading6.setFont(new java.awt.Font("Tahoma", 3, 14)); heading6.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); heading6.setText("ADD NEW BOOKS =>"); getContentPane().add(heading6); heading6.setBounds(120, 330, 210, 30); heading7.setFont(new java.awt.Font("Tahoma", 3, 14));
heading7.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); heading7.setText("RETURN BOOK =>"); getContentPane().add(heading7); heading7.setBounds(120, 220, 210, 30);
returnbook.setText("RETURN"); returnbook.setToolTipText("click to return book"); Department of Information Technology, GIET, Gunupur
Library Management System
} returnbook.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent evt)
{
returnb rrr=new returnb();
} }); getContentPane().add(returnbook); returnbook.setBounds(380, 220, 120, 30); pack();
setSize(800,600);
setLocation(50,50);
setVisible(true);
public static void main(String args[]) { LibrarianPage lp=new LibrarianPage(); } // Variables declaration ‐ do not modify private javax.swing.JButton addbooks; private javax.swing.JButton deletebooks; Department of Information Technology, GIET, Gunupur
Library Management System
private javax.swing.JLabel heading; private javax.swing.JLabel heading1; private javax.swing.JLabel heading3; private javax.swing.JLabel heading4; private javax.swing.JLabel heading5; private javax.swing.JLabel heading6; private javax.swing.JLabel heading7; private javax.swing.JButton issuebook; private javax.swing.JButton logout; private javax.swing.JButton reserve; private javax.swing.JButton returnbook; // End of variables declaration }
Department of Information Technology, GIET, Gunupur
Library Management System
LEAST BOOK PAGE OF SAMPLE CODE import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.sql.*; public class ListBook extends JFrame{
private JPanel pBook = new JPanel ();
private JTable table;
private JScrollPane jsp;
private Object data1[][];
private Container c;
private JButton ok;
int row=0;
public ListBook() {
pBook.setLayout (null);
ok = new JButton ("ok");
ok.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent evt)
{
Department of Information Technology, GIET, Gunupur
Library Management System
listbok();
}
});
ok.setBounds (25, 175, 125, 25);
pBook.add(ok);
getContentPane().add (pBook, BorderLayout.CENTER);
setSize(400,400);
//setVisible (true);
setLocation(200,200);
}
public void listbok(){
Connection con=null;
String url="jdbc:odbc:GIET";
Statement st=null;
try {
Department of Information Technology, GIET, Gunupur
Library Management System
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection(url);
st = con.createStatement();
String q,bavl,bisr;
ResultSet rss=st.executeQuery("SELECT * FROM bk ");
while(rss.next()){
row++;
}
System.out.println(row);
data1=new Object[row][6];
System.out.println("hai");
Object[] Colheads={"Book id ","book name","book auther","book category","issued to","status"};
ResultSet rs = st.executeQuery ("SELECT * FROM bk "); //Executing the Query.
for(int i1=0;i1
View more...
Comments