Advjava Micro
Advjava Micro
MANDAL’S
Group Members:
Guided by:
Mr.Shafique Shaikh
Affiliated to
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION MUMBAI.51
CE CERTIFICATE
This is to verify that
The microproject is submitted in partial fulfillment for the first year diploma in computer
engineering affiliated to Maharashtra state board of technical education ,Mumbai for
academic year 2022-23
INDEX
PART-B OUTCOME
1.0 Brief Description 7
2.0 Aim/Benefits of the micro-project 8
3.0 Course Outcome Addressed 8
4.0 Source Code 9 - 24
5.0 Output 25-26
6.0 Conclusion 27
Part A: A micro-project proposal
3.0Proposed methodology
4.0Action Plan
7
PART-B OUTCOME
As we all know library has a vast number of books and to maintain the record of those books it would
be a hilarious work load , in a register ; so we try to do some effective solution for these
problem .with help of java we created an Library Management System for book Issue.
Library Book Issue Management System helps you to manage the such a vast amount of data of books
that has been issued by the peoples and maintain their record of books
James Gosling, Mike Sheridan, and Patrick Naughton initiated the Java language project in
June 1991. Java was originally designed for interactive television, but it was too advanced for the
digital cable television industry at the time. The language was initially called Oak after an oak tree that
stood outside Gosling's office. Later the project went by the name Green and was finally renamed Java,
from Java coffee, the coffee from Indonesia. Gosling designed Java with a C/C++-style syntax that
system and application programmers would find familiar.
8
2.0 Aim/Benefits of the micro-project
9
Source Code
package library;
import java.awt.EventQueue;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
EventQueue.invokeLater(new Runnable() {
window.frm.setVisible(true);
} catch (Exception e) {
e.printStackTrace(); } } }); }
public home() {
initialize(); }
frm.setTitle("Saste Library");
frm.setIconImage(Toolkit.getDefaultToolkit().getImage("P:\\dev. Games\\library\\src\\library\\images\\home_icon.jpg"));
frm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frm.getContentPane().setLayout(null);
10
btnNewButton.addActionListener(new ActionListener() {
a.setVisible(true); } });
btnNewButton.setOpaque(false);
frm.getContentPane().add(btnNewButton);
btnNewButton_1.addActionListener(new ActionListener() {
s.setVisible(true); } });
btnNewButton_1.setOpaque(false);
frm.getContentPane().add(btnNewButton_1);
btnNewButton_2.addActionListener(new ActionListener() {
i.setVisible(true); } });
btnNewButton_2.setOpaque(false);
11
btnNewButton_2.setBounds(560, 404, 115, 41);
frm.getContentPane().add(btnNewButton_2);
frm.getContentPane().add(lblNewLabel);
frm.getContentPane().add(lblNewLabel_1);
package library;
import java.awt.EventQueue;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionListener;
import java.beans.Statement;
import java.sql.*;
import java.awt.event.ActionEvent;
12
EventQueue.invokeLater(new Runnable() {
frame.setVisible(true); }
public Add_book() {
setContentPane(contentPane);
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
contentPane.add(lblNewLabel, BorderLayout.NORTH);
contentPane.add(panel, BorderLayout.CENTER);
panel.setLayout(null);
panel.add(separator);
panel.add(bk_id);
13
JLabel bk_nm = new JLabel("Book Name :");
panel.add(bk_nm);
panel.add(bk_aut);
panel.add(bk_quan);
panel.add(bk_mrp);
panel.add(bki_tf);
bki_tf.setColumns(10);
panel.add(bkn_tf);
bkn_tf.setColumns(10);
14
panel.add(bka_tf);
bka_tf.setColumns(10);
panel.add(bkq_tf);
bkq_tf.setColumns(10);
panel.add(bkm_tf);
bkm_tf.setColumns(10);
save.addActionListener(new ActionListener() {
try{ Class.forName("com.mysql.cj.jdbc.Driver");
System.out.println("Driver is registered");
"pksa22","2318");
System.out.println("databse connected”);
System.out.println(sql);
try
{ stmt.execute(sql);
JOptionPane.showMessageDialog(null,"BOOK IS ADDED");
bki_tf.setText("");
bkn_tf.setText("");
bka_tf.setText("");
bkq_tf.setText("");
bkm_tf.setText("");
}
15
catch(Exception ex)
{ System.out.println(ex); } }
catch(Exception eg)
{ System.out.println(eg); }} });
save.setBackground(Color.ORANGE);
panel.add(save);
cancel.addActionListener(new ActionListener() {
System.exit(0);
} });
cancel.setBackground(Color.ORANGE);
panel.add(cancel);
panel.add(lblNewLabel_1);
} }
package library;
import java.awt.EventQueue;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionListener;
16
import java.beans.Statement;
import java.sql.*;
import java.awt.event.ActionEvent;
EventQueue.invokeLater(new Runnable() {
try {
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
} } }); }
public Std_login() {
setIconImage(Toolkit.getDefaultToolkit().getImage("P:\\dev. Games\\library\\src\\library\\images\\
student.png"));
setContentPane(contentPane);
contentPane.setLayout(null);
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
contentPane.add(panel);
panel.setLayout(null);
panel.add(separator);
panel.add(lblNewLabel_1);
panel.add(lblNewLabel_2);
panel.add(lblNewLabel_3);
panel.add(lblNewLabel_4);
18
lblNewLabel_5.setFont(new Font("Times New Roman", Font.BOLD, 12));
panel.add(lblNewLabel_5);
id = new JTextField();
panel.add(id);
id.setColumns(10);
panel.add(name);
name.setColumns(10);
panel.add(mob);
mob.setColumns(10);
panel.add(branch);
year.setModel(new DefaultComboBoxModel(new String[] {"Select Year", "1st Year", "2nd Year", "3rd Year"}));
panel.add(year);
save_std.addActionListener(new ActionListener() {
try{ Class.forName("com.mysql.cj.jdbc.Driver");
System.out.println("Driver is registered");
"','"+name.getText()+"','"+mob.getText()+"','"+branch.getSelectedItem()+"','"+year.getSelectedItem()+"');";
System.out.println(sql);
try
stmt.execute(sql);
id.setText("");
name.setText("");
mob.setText("");
branch.setSelectedIndex(0);
year.setSelectedIndex(0);
catch(Exception ex)
{ System.out.println(ex); }
});
save_std.setBackground(Color.ORANGE);
panel.add(save_std);
cancel_std.addActionListener(new ActionListener() {
System.exit(0);}});
cancel_std.setBackground(Color.ORANGE);
20
cancel_std.setForeground(new Color(129, 0, 129));
panel.add(cancel_std)
lblNewLabel_6.setIcon(newImageIcon("P:\\dev.Games\\library\\src\\library\\images\\123456.png"));
panel.add(lblNewLabel_6);
} }
package library;
import java.awt.EventQueue;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionListener;
import java.beans.Statement;
import java.sql.*;
import java.util.*;
import java.awt.event.ActionEvent;
EventQueue.invokeLater(new Runnable() {
frame.setVisible(true);
} catch (Exception e) {
21
e.printStackTrace();
} } }); }
setIconImage(Toolkit.getDefaultToolkit().getImage("P:\\dev. Games\\library\\src\\library\\images\\issue.png"));
setContentPane(contentPane);
contentPane.setLayout(null);
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
contentPane.add(lblNewLabel);
contentPane.add(panel);
panel.setLayout(null);
panel.add(lblNewLabel_1);
panel.add(lblNewLabel_2);
22
lblNewLabel_3.setForeground(new Color(129, 0, 129));
panel.add(lblNewLabel_3);
panel.add(lblNewLabel_4);
panel.add(bid);
bid.setColumns(10);
panel.add(sid);
sid.setColumns(10);
panel.add(issue);
issue.setColumns(10);
panel.add(due);
due.setColumns(10);
btnNewButton.addActionListener(new ActionListener() {
try{
Class.forName("com.mysql.cj.jdbc.Driver");
23
System.out.println("Driver is registered");
System.out.println("databse connected");
if(rs.next()) {
if(rs1.next()) {
try
stmt.execute(sql);
JOptionPane.showMessageDialog(null,"BOOK IS ISSUED");
bid.setText("");
sid.setText("");
issue.setText("");
due.setText("");
catch(Exception ex)
{ System.out.println(ex); } }
} } });
btnNewButton.setBackground(Color.ORANGE);
panel.add(btnNewButton);
btnNewButton_1.addActionListener(new ActionListener() {
System.exit(0); } });
btnNewButton_1.setBackground(Color.ORANGE);
panel.add(btnNewButton_1);
panel.add(lblNewLabel_5);
contentPane.add(separator);
OutPut
25
26
27
Conclusion:
28