You are on page 1of 88

A PROJECT ON

STUDENT INFORMATION SYSTEM

Submitted to

A project submitted to KRISHNA UNVIERSITY


In partial fulfillment of the requirement for the award of Degree of
BACHELOR OF COMPUTER SCIENCE

Submitted by
JAYANTH G Y173112009
AJAY N Y173112027
KARTHIK K Y173112011

Under the Guidance of

Mrs. SAI RAM


M.C.A

DEPARTMENTOF COMPUTER SCIENCE


KRISHNAVENI DEGREE COLLEGE
Affiliated to Krishna University, Machilipatnam .
2019-2020
DEPARTMENT OF COMPUTER SCIENCE
AAR&BMR COLLEGE
Affiliated to Krishna University, Machilipatnam .

CERTIFICATE

This is to certify that the project titled “A PROJECT ON STUDENT

INFORMATION SYSTEM”. Is a bonafied work done by G.JAYANTH

(Reg.No.Y173112009), N.AJAY (Reg.No.Y173112027), K.KARTHIK

(Reg.No.Y173112011), under my guidance and supervision in partial fulfillment of the

requirement for the award of degree of Bachelor of Computer Science in AAR&BMR

DEGREE COLLEGE, Vijayawada, Affiliated to Krishna University ,Machilipatnam ,

during the academic year 2019-2020& completed the project within a period of 12 weeks.

Project Guide Head of the Department


SAI RAM SAI RAM
DECLARATION

I hereby declare that this project titled “A PROJECT ON STUDENT


INFORMATION SYSTEM”.Is a bonafide work done by me under the guidance of
Mrs .SAI RAM. This project work is submitted to AAR&BMR DEGREE COLLEGE in
period fulfillment of the requirement for the award of BACHELOR OF COMPUTER
SCIENCE during the academic year 2019-2020.

I also declare that this project is a result of my own effort and that it has not been
submitted to any other University for the award of any degree.

Date:
Place: VIJAYAWADA
ACKNOWLEDGEMENT

It is great pleasure to take opportunity and express my gratitude to all those who
helped me throughout my project work.

First and foremost, thankful to Sri. AJAY KUAMR Principal, AAR&BMR


DEGREE COLLEGE, for giving me opportunity to take up the project work.

I also thank to Mrs. SAI RAM, Head of the department of Computer Science. For
giving me opportunity to take up the project work and helping me through out.

I would also like to thank Mrs. SAI RAM Computer Science for his valuable
guidance and support for the completion of my project work.

I would like to express my sincere and heartful thanks to all the faculty of the
Department for their continuous cooperation, which has given me the guidance to build up
adamant aspiration over the completion of my project.

Finally I thank one and all who directly and indirectly helped me to complete my
Project successfully.

G.JAYANTH (Reg.No.Y173112009)
N.AJAY (Reg.No.Y173112027)
K.KARTHIK (Reg.No.Y173112011)
1. Introduction

The Student Management System (SMS) can handle all the details about
a Student. The details include College Course details, Students personal
details, Academic details etc., The Student Management System is an
automated version of manual Student Management System.

A SMS mainly consists of a computerized database, a collection of inter-


related tables for a particular subject or purpose, capable to produce different
reports relevant to the user. An application program is tied with the database
for easy access and interface to the database. Using Application program or
front-end, we can store, retrieve and manage all information in proper way.

During coding and design of the software Project, Java NetBeans IDE, a
powerful front-end tool is used for getting Graphical User Interface (GUI)
based integrated platform and coding simplicity. As a back-end a powerful,
open source RDBMS, My SQL is used as per requirement of the CBSE
curriculum of Informatics Practices Course.

2. Objective & Scope of the Project


The main objective of this system, is to reduce the consumption of time during
maintaining the records of student management. Separate divisions are
provide to maintain the records of students. In other words, our SMS (Student
Management System) has, following objectives:
 Simple database is maintained.
 Easy operations for the operator of the system.
 User interfaces are user friendly and attractive, it takes very less time
for the operator to get use-to with the system.
In its current scope, the software enables user to retrieve and update the
information from centralized database designed with MySQL. This software
does not require much training time of the users due to limited functionality
and simplicity.
During the development of Student Information System project, Java
NetBeans IDE, a powerful, open source event-driven form-based
development environment is used for modular design and future
expandability of the system.
Despite of the best effort of the developer, the following limitations and
functional boundaries are visible, which limits the scope of this application
software.
So far as future scope of the project is concerned, firstly it is open to any
modular expansion i.e. other modules or functions can be designed and
embedded to handle the user need in future. Any part of the software and
reports can be modified independently without much effort.

3. Theoretical Background
3.1 What is Database?
Introduction and Concepts:
A database is a collection of information related to a particular subject or
purpose, such as tracking customer orders or maintaining a music collection.
Using any RDBMS application software like MS SQL Server, MySQL, Oracle,
Sybase etc., you can manage all your information from a single database file.
Within the file, divide your data into separate storage containers called tables.
You may and retrieve the data using queries.
A table is a collection of data about a specific topic, such as products or
suppliers. Using a separate table for each topic means you can store that data
only once, which makes your database more efficient and reduces data-entry
errors. Table organises data into columns (called fields) and rows (called
records).
A Primary key is one or more fields whose value or values uniquely identify
each record in a table. In a relationship, a primary key is used to refer to
specific record in one table from another table. A primary key is called foreign
key when it is referred to from another table.
To find and retrieve just the data that meets conditions you specify, including
data from multiple tables, create a query. A query can also update or delete
multiple records at the same time, and perform built-in or custom calculations
on your data.

Role of RDBMS Application Program:

A computer database works as a electronic filing system, which has a large


number of ways of cross-referencing, and this allows the user many different
ways in which to re-organize and retrieve data. A database can handle
business inventory, accounting and filing and use the information in its files
to prepare summaries, estimates and other reports. The management of data
in a database system is done by means of a general-purpose software package
called a Database Management System (DBMS). Some commercially available
DBMS are MS SQL Server, MS ACCESS, INGRES, ORACLE, and Sybase. A
database management system, therefore, is a combination of hardware and
software that can be used to set up and monitor a database, and can manage
the updating and retrieval of database that has been stored in it. Most of the
database management systems have the following capabilities:
 Creating of a table, addition, deletion, modification of records.
 Retrieving data collectively or selectively.
 The data stored can be sorted or indexed at the user's discretion and
direction.
 Various reports can be produced from the system. These may be either
standardized report or that may be specifically generated according to
specific user definition.
 Mathematical functions can be performed and the data stored in the
database can be manipulated with these functions to perform the
desired calculations.
 To maintain data integrity and database use.
The DBMS interprets and processes users' requests to retrieve information
from a database. In most cases, a query request will have to penetrate several
layers of software in the DBMS and operating system before the physical
database can be accessed. The DBMS responds to a query by invoking the
appropriate subprograms, each of which performs its special function to
interpret the query, or to locate the desired data in the database and present it
in the desired order.

3.2 What is My SQL?

The management of data in a database system is done by means of a general-


purpose software package called a Database Management System (DBMS).
Somecommercially available RDBMS are MS SQL Server, MS ACCESS,
INGRES, ORACLE, and Sybase.
MySQL, the most popular Open Source SQL database management system, is
developed, distributed, and supported by Oracle Corporation. MySQL is
named after co-founder Monty Widenius's daughter, my. The name of the
MySQL Dolphin (our logo) is “Sakila,”
 MySQL is a database management system.
A database is a structured collection of data. It may be anything from a
simple shopping list to a picture gallery or the vast amounts of
information in a corporate network. To add, access, and process data
stored in a computer database, you need a database management
system such as MySQL Server. Since computers are very good at
handling large amounts of data, database management systems play a
central role in computing, as standalone utilities, or as parts of other
applications.
 MySQL is based on SQL.
A relational database stores data in separate tables rather than putting
all the data in one big storeroom. This adds speed and flexibility. The
SQL part of “MySQL” stands for “Structured Query Language.” SQL is
the most common standardized language used to access databases and
is defined by the ANSI/ISO SQL Standard. The SQL standard has been
evolving since 1986 and several versions exist. In this manual, “SQL-92”
refers to the standard released in 1992, “SQL: 1999” refers to the
standard released in 1999, and “SQL: 2003” refers to the current version
of the standard.
 MySQL software is Open Source.
Open Source means that it is possible for anyone to use and modify the
software. Anybody can download the MySQL software from the
Internet and use it without paying anything. If you wish, you may
study the source code and change it to suit your needs. The MySQL
software uses the GPL (GNU General Public License),
 The MySQL Database Server is very fast, reliable, and easy to use.
If that is what you are looking for, you should give it a try. MySQL
Server also has a practical set of features developed in close cooperation
with our users. You can find a performance comparison of MySQL
Server with other database managers on our benchmark page. MySQL
Server was originally developed to handle large databases much faster
than existing solutions and has been successfully used in highly
demanding production environments for several years. Although under
constant development, MySQL Server today offers a rich and useful set
of functions. Its connectivity, speed, and security make MySQL Server
highly suited for accessing databases on the Internet.
 MySQL Server works in client/server or embedded systems.
The MySQL Database Software is a client/server system that consists of
a multi-threaded SQL server that supports different backends, several
different client programs and libraries, administrative tools, and a wide
range of application programming interfaces (APIs).

The Main Features of MySQL

 Written in C and C++.


 Works on many different platforms.
 Uses multi-layered server design with independent modules.
 Provides transactional and nontransactional storage engines.
 Designed to make it relatively easy to add other storage engines. This is
useful if you want to provide an SQL interface for an in-house database.
 Uses a very fast thread-based memory allocation system.
 Executes very fast joins using an optimized nested-loop join.
 Implements SQL functions using a highly optimized class library that
should be as fast as possible. Usually there is no memory allocation at
all after query initialization.
 Provides the server as a separate program for use in a client/server
networked environment, and as a library that can be embedded (linked)
into standalone applications. Such applications can be used in isolation
or in environments where no network is available.
 Password security by encryption of all password traffic when you
connect to a server.
 Support for large databases. We use MySQL Server with databases that
contain 50 million records. We also know of users who use MySQL
Server with 200,000 tables and about 5,000,000,000 rows.
 MySQL client programs can be written in many languages. A client
library written in C is available for clients written in C or C++, or for
any language that provides C bindings.
 APIs for C, C++, Eiffel, Java, Perl, PHP, Python, Ruby, and Tcl are
available, enabling MySQL clients to be written in many languages.
 The Connector/ODBC (MyODBC) interface provides MySQL support
for client programs that use ODBC (Open Database Connectivity)
connections.
 The Connector/J interface provides MySQL support for Java client
programs that use JDBC connections. Clients can be run on Windows or
Unix. Connector/J source is available.
3.3 What is NetBeans IDE ?

NetBeans started as a student project (originally called Xelfi) in the Czech


Republic in 1996. The goal was to write a Delphi-like Java IDE in Java. Xelfi
was the first Java IDE (Integrated Development Environment) written in Java,
with its first pre-releases in 1997. Xelfi was a fun project to work on, especially
since Java IDE space was uncharted territory at that time. The project attracted
enough interest that these students, once they graduated, decided that they
could market it as a commercial product. Soliciting resources from friends and
relatives for a web space, they formed a company around it.

Soon after, they were contacted by Roman Stanek, an entrepreneur who had
already been involved in several startups in the Czech Republic. He was
looking for a good idea to invest in, and discovered Xelfi. He met with the
founders; they hit it off, and a business was born.

In the spring of 1999, NetBeans DeveloperX2 was released, supporting Swing.


The performance improvements that came in JDK 1.3, released in the fall of
1999, made NetBeans a viable choice for development tools. By the summer of
1999, the team was hard at work re-architecting DeveloperX2 into the more
modular NetBeans that forms the basis of the software today.

Something else was afoot in the summer of 1999: Sun Microsystems wanted
better Java development tools, and had become interested in NetBeans. It was
a dream come true for the NetBeans team: NetBeans would become the
flagship tool set of the maker of Java itself! By the fall, with the next
generation of NetBeans Developer in beta, a deal was struck. Sun
Microsystems had also acquired another tools company, during the
acquisition, the young developers who had been involved in open-source
projects for most of their programming careers, mentioned the idea of open-
sourcing NetBeans. Fast forward to less than six months later, the decision
was made that NetBeans would be open sourced. While Sun had contributed
considerable amounts of code to open source projects over the years, this was
Sun's first sponsored open source project, one in which Sun would be paying
for the site and handling the infrastructure.
4. Problem Definition & Analysis
The hardest part of building a software system is deciding precisely what to build.
No other part of the conceptual work is so difficult as establishing the detailed
technical requirement. Defining and applying good, complete requirements are hard
to work, and success in this endeavor has eluded many of us. Yet, we continue to
make progress.
Problem definition describes the What of a system, not How . The quality of a
software product is only as good as the process that creates it. Problem definition is
one of the most crucial steps in this creation process. Without defining a problem,
developers do not know what to build, customers do not know what to expect, and
there is no way to validate that the built system satisfies the requirement.
Problem definition and Analysis is the activity that encompasses learning about the
problem to be solved, understanding the needs of customer and users, trying to find
out who the user really is, and understanding all the constraints on the solution. It
includes all activities related to the following:
 Identification and documentation of customer’s or user’s needs.
 Creation of a document that describes the external behavior and the
association constraints that will satisfies those needs.
 Analysis and validation of the requirements documents to ensure consistency,
completeness, and feasibility
 Evolution of needs.
After the analysis of the functioning of a Student Information System, the proposed
System is expected to do the following: -
 To provide a user friendly, Graphical User Interface (GUI) based integrated
and centralized environment for computerized Student Information System.
 The proposed system should maintain all the records about student
information and should generate the required reports and information when
required.
 To provide efficient and secured Information storage, flow and retrieval
system, ensuring the integrity and validity of records.
 To provide graphical and user-friendly interface to interact with a centralized
database based on client-server architecture.
 To identify the critical operation procedure and possibilities of simplification
using modern IT tools and practices.
5. System Implementation

5.1 The Hardware used:

While developing the system, the used hardware are:


PC with Pentium IV processor or sometimes, PC with Celeron (1.7 GHz)
processor having 256 MB RAM, SVGA and other required devices.

5.2 The Softwares used:


 Microsoft Windows® XP as Operating System.
 Java NetBeans 6.9 as Front-end Development environment.
 MySQL as Back-end Sever with Database for Testing.
 MS-Word 2000 for documentation.
6. System Design & Development

6.1 Database Design:


An important aspect of system design is the design of data storage structure.
To begin with a logical model of data structure is developed first. A database
is a container object which contains tables, queries, reports and data
validation policies enforcement rules or constraints etc. A logical data often
represented as a records are kept in different tables after reducing anomalies
and redundancies. The goodness of data base design lies in the table structure
and its relationship.
This software project maintains a database named Student Information
system which contains the following tables.

Table Design:
The database of Library System contains 1 table. The table is normalized to
minimize the redundancies of data and enforcing the validation rules of the
organization. Most of the tables are designed to store master records. The
table and their structure is given below.
Table: information
6.2 I/O Forms Design & Event Coding:
The software project for Student Information System contains various forms
along with programming codes. Forms (JFrames) and their event coding are
given below.

Frame: StudentInformationSystem.java

Code for StudentInformationSystem:

package studentinformationsystem;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class StudentInformationSystem extends JFrame {
public static void main(String[] args) {
//StudentInformationSystem sis =
new StudentInformationSystem();

JFrame f1;
JPanel p1;
JLabel l1, l2, l3;
JTextField t1;
JPasswordField pass;
JButton b1, b2;
ImageIcon img;
public StudentInformationSystem() {
p1 = new JPanel();
p1.setLayout(null);
p1.setBackground(new Color(135, 206, 250));
img = new ImageIcon(getClass().getResource(""));
img=null;
l1 = new JLabel(img);
l1.setBounds(0, 0, 215, 360);
l2 = new JLabel("Username");
l2.setBounds(230, 30, 90, 40);
l2.setFont(new Font("Serif", Font.PLAIN, 20));
l3 = new JLabel("Password");
l3.setBounds(230, 120, 100, 40);
l3.setFont(new Font("Serif", Font.PLAIN, 20));
t1 = new JTextField(30);
t1.setBounds(320, 30, 230, 35);
pass = new JPasswordField(10);
pass.setBounds(320, 120, 230, 35);
b1 = new JButton("User-Login");
b1.setBounds(230, 250, 100, 50);
b1.setBackground(new Color(204, 229, 255));
b2 = new JButton("Administrator-Login");
b2.setBounds(400, 250, 150, 50);
b2.setBackground(new Color(204, 229, 255));
p1.add(l1);
p1.add(l2);
p1.add(l3);
p1.add(t1);
p1.add(pass);
p1.add(b1);
p1.add(b2);
add(p1);
setSize(580, 390);
setVisible(true);
setResizable(false);
setLocation(370, 50);
setTitle("Student Information System");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
userlogin();
adminlogin();
}
public void userlogin() {
b1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String puname = t1.getText();
String ppaswd = pass.getText();
if (puname.equals("user") && ppaswd.equals("user")) {
UserView re = new UserView();
re.setVisible(true);
dispose();
} else {
JOptionPane.showMessageDialog(null, "Wrong Password / Username");
t1.setText("");
pass.setText("");
t1.requestFocus();
}
}
});
}
public void adminlogin() {
b2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String puname = t1.getText();
String ppaswd = pass.getText();
if (puname.equals("admin") && ppaswd.equals("admin")) {
AdminFrame re = new AdminFrame();
re.setVisible(true);
dispose();
} else {
JOptionPane.showMessageDialog(null, "Wrong Password / Username");
t1.setText("");
pass.setText("");
t1.requestFocus();
}
}
});
}

Frame: AdminFrame.java
Code for adminframe:

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.sql.*;
import javax.swing.filechooser.FileNameExtensionFilter
public class AdminFrame extends JFrame {
public static void main(String[] args) {
AdminFrame admin = new AdminFrame();
}
Container c;
JPanel p1, p2, p3, p4, p5;
ImageIcon img;
JLabel l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15;
JTextField t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20,
t21;
JButton logout, save, show, attach;
JLabel attached;
static final String JDBC_DRIVER = "com.mysql.jdbc.Driver";
static final String DB_URL = "jdbc:mysql://localhost/student";
static final String USER = "admin";
static final String PASS = "admin";
String s;
AdminFrame() {
c = getContentPane();
p1 = new JPanel();
p1.setBackground(Color.blue);
p1.setBounds(0, -5, 1200, 85);
img = new ImageIcon(getClass().getResource("header.jpg"));
l1 = new JLabel(img);
p2 = new JPanel();
p2.setLayout(null);
p2.setBackground(Color.white);
p2.setBounds(0, 80, 1200, 40);
JLabel label1 = new JLabel("Fill the Following Information:");
label1.setFont(new Font(label1.getName(), Font.BOLD, 20));
label1.setForeground(Color.blue);
p2.add(label1);
label1.setBounds(20, -5, 300, 50);
save = new JButton("Save Record");
save.setBounds(950, 0, 120, 40);
save.setBackground(Color.green);
p2.add(save);
show = new JButton("show Record");
show.setBounds(1080, 0, 110, 40);
show.setBackground(Color.green);
p2.add(show);
logout = new JButton("Log-Out");
logout.setBounds(820, 0, 120, 40);
logout.setBackground(Color.green);
p2.add(logout);
p3 = new JPanel();
p3.setLayout(null);
p3.setBackground(new Color(135, 206, 250));
p3.setBounds(0, 80, 1200, 400);
p4 = new JPanel();
p4.setLayout(null);
p4.setBounds(0, 480, 1200, 50);
p4.setBackground(Color.white);
JLabel label = new JLabel("Accadamin details:");
label.setFont(new Font(label.getName(), Font.BOLD, 20));
label.setForeground(Color.blue);
p4.add(label);
label.setBounds(20, 0, 200, 50);
p5 = new JPanel();
p5.setLayout(null);
p5.setBackground(new Color(135, 206, 250));
JLabel slc = new JLabel("Level");
slc.setBounds(40, 540, 100, 30);
slc.setFont(new Font(slc.getName(), Font.BOLD, 18));
t14 = new JTextField();
t14.setBounds(20, 580, 130, 35);
t15 = new JTextField();
t15.setBounds(20, 640, 130, 35);
p5.add(slc);
p5.add(t14);
p5.add(t15);
JLabel name = new JLabel(" Name of Institute");
name.setBounds(300, 540, 200, 30);
name.setFont(new Font(name.getName(), Font.BOLD, 18));
t16 = new JTextField();
t16.setBounds(230, 580, 300, 35);
t17 = new JTextField();
t17.setBounds(230, 640, 300, 35);
p5.add(name);
p5.add(t16);
p5.add(t17);
JLabel per = new JLabel("Percentage");
per.setBounds(600, 540, 150, 30);
per.setFont(new Font(per.getName(), Font.BOLD, 18));
t18 = new JTextField();
t18.setBounds(570, 580, 250, 35);
t19 = new JTextField();
t19.setBounds(570, 640, 250, 35);
p5.add(per);
p5.add(t18);
p5.add(t19);
JLabel year = new JLabel(" Passed Year");
year.setBounds(900, 540, 200, 30);
year.setFont(new Font(year.getName(), Font.BOLD, 18));
t20 = new JTextField();
t20.setBounds(880, 580, 250, 35);
t21 = new JTextField();
t21.setBounds(880, 640, 250, 35);
p5.add(year);
p5.add(t20);
p5.add(t21);
l2 = new JLabel("Form no.:");
l2.setBounds(20, 70, 80, 30);
t1 = new JTextField(50);
t1.setBounds(90, 70, 130, 30);
l3 = new JLabel("Batch no.(Year):");
l3.setBounds(250, 70, 130, 30);
t2 = new JTextField(50);
t2.setBounds(350, 70, 150, 30);
l4 = new JLabel("Student ID no.:");
l4.setBounds(530, 70, 130, 30);
t3 = new JTextField(50);
t3.setBounds(630, 70, 150, 30);
l5 = new JLabel("First Name:");
l5.setBounds(20, 130, 80, 30);
t4 = new JTextField(50);
t4.setBounds(90, 130, 150, 30);
l6 = new JLabel("Middle Name:");
l6.setBounds(250, 130, 130, 30);
t5 = new JTextField(50);
t5.setBounds(350, 130, 160, 30);
l7 = new JLabel("Last Name:");
l7.setBounds(550, 130, 130, 30);
t6 = new JTextField(50);
t6.setBounds(630, 130, 150, 30);
l8 = new JLabel("Email:");
l8.setBounds(20, 190, 80, 30);
t7 = new JTextField(50);
t7.setBounds(90, 190, 150, 30);
l9 = new JLabel("Contact No:");
l9.setBounds(250, 190, 130, 30);
t8 = new JTextField(50);
t8.setBounds(350, 190, 160, 30);
l10 = new JLabel("Date of Birth:");
l10.setBounds(550, 190, 130, 30);
t9 = new JTextField(50);
t9.setBounds(630, 190, 150, 30);
l11 = new JLabel("Father Name:");
l11.setBounds(20, 250, 130, 30);
t10 = new JTextField(50);
t10.setBounds(100, 250, 250, 30);
l12 = new JLabel("Mother Name:");
l12.setBounds(430, 250, 130, 30);
t11 = new JTextField(50);
t11.setBounds(530, 250, 250, 30);
l13 = new JLabel("Permanent Address:");
l13.setBounds(20, 310, 130, 30);
t12 = new JTextField(50);
t12.setBounds(140, 310, 230, 30);
l14 = new JLabel("Temporary Address:");
l14.setBounds(400, 310, 130, 30);
t13 = new JTextField(50);
t13.setBounds(530, 310, 250, 30);
attach = new JButton("Attach Image");
attach.setBounds(910, 300, 150, 40);
p3.add(attach);
attached = new JLabel("Attach Image Here");
attached.setBounds(900, 70, 200, 200);
attached.setFont(new Font(label.getName(), Font.BOLD, 20));
attached.setForeground(Color.BLACK);
p3.add(attached);
attach.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent ae) {
JFileChooser file = new JFileChooser();
file.setCurrentDirectory(new File(System.getProperty("user.home")));
FileNameExtensionFilter filter = new FileNameExtensionFilter("*.Image", "jpg",
"JPG", "JPEG", "png");
file.addChoosableFileFilter(filter);
int result = file.showSaveDialog(null);
if (result == JFileChooser.APPROVE_OPTION) {
File selectedFile = file.getSelectedFile();
String path = selectedFile.getAbsolutePath();
attached.setIcon(ResizeImage(path));
s = path;
} else if (result == JFileChooser.CANCEL_OPTION) {
JOptionPane.showMessageDialog(null, "file not selected");
}
}
});
p1.add(l1);
p3.add(l2);
p3.add(t1);
p3.add(l3);
p3.add(t2);
p3.add(l4);
p3.add(t3);
p3.add(l5);
p3.add(t4);
p3.add(l6);
p3.add(t5);
p3.add(l7);
p3.add(t6);
p3.add(l8);
p3.add(t7);
p3.add(l9);
p3.add(t8);
p3.add(l10);
p3.add(t9);
p3.add(l11);
p3.add(t10);
p3.add(l12);
p3.add(t11);
p3.add(l13);
p3.add(t12);
p3.add(l14);
p3.add(t13);
c.add(p1);
c.add(p2);
c.add(p3);
c.add(p4);
c.add(p5);
setSize(1200, 750);
setLocationRelativeTo(null);
setResizable(false);
setVisible(true);
setTitle("Student Information System Adminstrator Panel");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
shows();
logout();
save();
}
public ImageIcon ResizeImage(String Imagepath) {
ImageIcon myImage = new ImageIcon(Imagepath);
Image img = myImage.getImage();
Image newImage = img.getScaledInstance(attached.getWidth(), attached.getHeight(),
Image.SCALE_SMOOTH);
ImageIcon Image = new ImageIcon(newImage);
return Image;
}
//end image chose
public void logout() {
logout.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
StudentInformationSystem r = new StudentInformationSystem();
r.setVisible(true);
dispose();
}
});
}
public void shows() {
show.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
AdminView ad = new AdminView();
ad.setVisible(true);
dispose();
}
});
}
public void save() {
save.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Connection conn = null;
Statement stmt = null;
String s1 = t1.getText();
String s2 = t2.getText();
String s3 = t3.getText();
String s4 = t4.getText();
String s5 = t5.getText();
String s6 = t6.getText();
String s7 = t7.getText();
String s8 = t8.getText();
String s9 = t9.getText();
String s10 = t10.getText();
String s11 = t11.getText();
String s12 = t12.getText();
String s13 = t13.getText();
String s14 = t14.getText();
String s15 = t15.getText();
String s16 = t16.getText();
String s17 = t17.getText();
String s18 = t18.getText();
String s19 = t19.getText();
String s20 = t20.getText();
String s21 = t21.getText();

if (t1.getText().equals("") || t2.getText().equals("") || t3.getText().equals("")


|| t4.getText().equals("") || t6.getText().equals("") || t7.getText().equals("")
|| t8.getText().equals("") || t9.getText().equals("") || t10.getText().equals("")
|| t11.getText().equals("") || t12.getText().equals("") || t13.getText().equals("")
|| t14.getText().equals("") || t15.getText().equals("") || t16.getText().equals("")
|| t17.getText().equals("") || t18.getText().equals("") || t19.getText().equals("")
|| t20.getText().equals("") || t21.getText().equals("")) {
JOptionPane.showMessageDialog(save, "All record Must be fill Out");
} else {
try {
Class.forName("com.mysql.jdbc.Driver");
conn = DriverManager.getConnection(DB_URL, USER, PASS);
System.out.println("every thing is ok in connection");
JOptionPane.showConfirmDialog(null, "Are you sure Insert Data?", "Delete",
JOptionPane.YES_NO_OPTION);
PreparedStatement ps = conn.prepareStatement("INSERT INTO
information(form_id,batch_no,student_id,first_name,middle_name,"
+
"last_name,email,contact,dob,father_name,mother_name,permanent_add,"
+
"temporary_add,particular_school,particular_higherschool,name_of_school,"
+ "name_of_higherschool,percentage_school,percentage_higherschool,"
+ "passed_year_school,passed_year_higherschool,image)"
+ "VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
System.out.println("ok in prepared statement");
InputStream is = new FileInputStream(new File(s));
ps.setString(1, s1);
ps.setString(2, s2);
ps.setString(3, s3);
ps.setString(4, s4);
ps.setString(5, s5);
ps.setString(6, s6);
ps.setString(7, s7);
ps.setString(8, s8);
ps.setString(9, s9);
ps.setString(10, s10);
ps.setString(11, s11);
ps.setString(12, s12);
ps.setString(13, s13);
ps.setString(14, s14);
ps.setString(15, s15);
ps.setString(16, s16);
ps.setString(17, s17);
ps.setString(18, s18);
ps.setString(19, s19);
ps.setString(20, s20);
ps.setString(21, s21);
ps.setBlob(22, is);
ps.executeUpdate();
System.out.println("ok while execute ");
JOptionPane.showMessageDialog(save, "sucessfully inserted Data");
t1.setText("");
t2.setText("");
t3.setText("");
t4.setText("");
t5.setText("");
t6.setText("");
t7.setText("");
t8.setText("");
t9.setText("");
t10.setText("");
t11.setText("");
t12.setText("");
t13.setText("");
t14.setText("");
t15.setText("");
t16.setText("");
t17.setText("");
t18.setText("");
t19.setText("");
t20.setText("");
t21.setText("");
} catch (SQLException se) {
se.printStackTrace();
} catch (Exception ek) {
ek.printStackTrace();
} finally {
try {
if (stmt != null) {
conn.close();
}
} catch (SQLException se) {
}
try {
if (conn != null) {
conn.close();
}
} catch (SQLException se) {
se.printStackTrace();
}//end finally try
}//end try
System.out.println("good bye");
}
}
});
}
}

Frame: AdminIndividual.java
Code for AdminIndividual:

package studentinformationsystem;
import net.proteanit.sql.DbUtils;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import javax.imageio.ImageIO;
import javax.swing.*;
public class AdminIndividual extends javax.swing.JFrame {
Connection conn = null;
ResultSet rs = null;
PreparedStatement pst = null;
public AdminIndividual() {
initComponents();
conn = dbconnect.java_db();
Toolkit toolkit = getToolkit();
Dimension size = toolkit.getScreenSize();
setLocation(size.width / 2 - getWidth() / 2,
size.height / 2 - getHeight() / 2);
setResizable(false);
setTitle("Student Information System");

}
private void initComponents() {
jButton1 = new javax.swing.JButton();
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jButton4 = new javax.swing.JButton();
jButton5 = new javax.swing.JButton();
jButton7 = new javax.swing.JButton();
jPanel2 = new javax.swing.JPanel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jTextField2 = new javax.swing.JTextField();
jTextField3 = new javax.swing.JTextField();
jLabel4 = new javax.swing.JLabel();
jTextField4 = new javax.swing.JTextField();
jLabel5 = new javax.swing.JLabel();
jTextField5 = new javax.swing.JTextField();
jButton6 = new javax.swing.JButton();
jTextField6 = new javax.swing.JTextField();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jTextField7 = new javax.swing.JTextField();
jLabel9 = new javax.swing.JLabel();
jTextField8 = new javax.swing.JTextField();
jLabel10 = new javax.swing.JLabel();
jTextField9 = new javax.swing.JTextField();
jLabel11 = new javax.swing.JLabel();
jTextField10 = new javax.swing.JTextField();
jLabel12 = new javax.swing.JLabel();
jTextField11 = new javax.swing.JTextField();
jLabel13 = new javax.swing.JLabel();
jTextField12 = new javax.swing.JTextField();
jLabel14 = new javax.swing.JLabel();
jTextField13 = new javax.swing.JTextField();
jLabel15 = new javax.swing.JLabel();
jTextField14 = new javax.swing.JTextField();
jLabel16 = new javax.swing.JLabel();
jLabel17 = new javax.swing.JLabel();
jLabel18 = new javax.swing.JLabel();
jLabel19 = new javax.swing.JLabel();
jLabel20 = new javax.swing.JLabel();
jTextField15 = new javax.swing.JTextField();
jTextField16 = new javax.swing.JTextField();
jTextField17 = new javax.swing.JTextField();
jTextField18 = new javax.swing.JTextField();
jTextField19 = new javax.swing.JTextField();
jTextField20 = new javax.swing.JTextField();
jTextField21 = new javax.swing.JTextField();
jTextField22 = new javax.swing.JTextField();
jLabel6 = new javax.swing.JLabel();
lbl_img = new javax.swing.JLabel();
lbl_img1 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jButton1.setBackground(new java.awt.Color(0, 51, 153));
jButton1.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/studentinformationsystem/header.jpg"))); //
NOI18N
jPanel1.setBackground(new java.awt.Color(0, 102, 255));
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel1.setText("Search Student By ID");
jTextField1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField1ActionPerformed(evt);
}
});
jTextField1.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent evt) {
jTextField1KeyReleased(evt);
}
});
jButton2.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/studentinformationsystem/logout.png"))); //
NOI18N
jButton2.setText("Logged Out");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jButton3.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/studentinformationsystem/update
icon.png")));
jButton3.setText("Update");
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
jButton4.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/studentinformationsystem/
delete_16x16.gif")));
jButton4.setText("Delete");
jButton4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton4ActionPerformed(evt);
}
});
jButton5.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/studentinformationsystem/erase-
128.png")));
jButton5.setText("Reset");
jButton5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton5ActionPerformed(evt);
}
});
jButton7.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/studentinformationsystem/back.png"))); //
NOI18N
jButton7.setText("Back");
jButton7.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton7ActionPerformed(evt);
}
});
jPanel2.setBackground(new java.awt.Color(153, 255, 204));
jLabel2.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel2.setText("Form NO.");
jLabel3.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel3.setText("First Name");
jTextField2.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jTextField2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField2ActionPerformed(evt);
}
});
jTextField3.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel4.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel4.setText("Batch (Year)");
jTextField4.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel5.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel5.setText("Student IID");
jTextField5.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jButton6.setText(" Images");
jButton6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton6ActionPerformed(evt);
}
});
jTextField6.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel7.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel7.setText("Middle Name");
jLabel8.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel8.setText("Last Name");
jTextField7.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel9.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel9.setText("Email");
jTextField8.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel10.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel10.setText("Contact no");
jTextField9.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N

jLabel11.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N


jLabel11.setText("Date of Birth");
jTextField10.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jTextField10.setText("year/month/days");

jLabel12.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N


jLabel12.setText("Father Name");
jTextField11.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel13.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel13.setText("Mother Name");
jTextField12.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel14.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel14.setText("Permanent Address");
jTextField13.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel15.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel15.setText("Temproary Address");
jTextField14.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel16.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jLabel16.setForeground(new java.awt.Color(0, 0, 255));
jLabel16.setText("Accedamic Details");
jLabel17.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel17.setText("Level");
jLabel18.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel18.setText("Name of Institute");
jLabel19.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel19.setText("Precentage %");
jLabel20.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel20.setText("Passed Year");
jTextField15.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jTextField16.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jTextField17.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jTextField18.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jTextField19.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jTextField20.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jTextField21.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jTextField22.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
jLabel6.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jLabel6.setForeground(new java.awt.Color(0, 0, 255));
jLabel6.setText("Students Information");
lbl_img1.setBackground(new java.awt.Color(0, 0, 153));
lbl_img1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
lbl_img1.setForeground(new java.awt.Color(0, 0, 255));
lbl_img1.setText("Image Attach Here");
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()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignme
nt.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE,
872, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADI
NG)
.addGroup(jPanel2Layout.createSequentialGroup() .addGr
oup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addGroup(jPanel2Layout.createSequentialGroup().addGroup(jPanel2
Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jLabel2,
javax.swing.GroupLayout.PREFERRED_SIZE, 88,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jTextField2,
javax.swing.GroupLayout.PREFERRED_SIZE, 153,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAIL
ING, false)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jLabel9,
javax.swing.GroupLayout.PREFERRED_SIZE, 53,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlace
ment.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jTextField8,
javax.swing.GroupLayout.PREFERRED_SIZE, 153,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING,
jPanel2Layout.createSequentialGroup()
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 88,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jTextField3,
javax.swing.GroupLayout.PREFERRED_SIZE, 153,
javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGap(26,26,26).addGroup(jPanel2Layout.createParallelGroup(javax.swing.Gr
oupLayout.Alignment.LEADING, false)
.addComponent(jLabel10)
.addComponent(jLabel4,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(jLabel7,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.addGap(26,26,26) .addGroup(jPanel2Layout.createParallelGroup(jav
ax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jTextField6,
javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)
.addComponent(jTextField4)
.addComponent(jTextField9)
.addComponent(jLabel13,
javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, 95,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(70, 70, 70))
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADI
NG)
.addComponent(jLabel12)
.addComponent(jLabel14))
.addGap(26, 26, 26)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupL
ayout.Alignment.LEADING, false)
.addComponent(jTextField11,
javax.swing.GroupLayout.DEFAULT_SIZE, 251, Short.MAX_VALUE)
.addComponent(jTextField13))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.R
ELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel15,
javax.swing.GroupLayout.PREFERRED_SIZE, 124,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(41, 41,
41))) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupL
ayout.Alignment.TRAILING, false)
.addComponent(jTextField14)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupL
ayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel2Layout.createSequentialGroup()
.addComponent(jLabel8)
.addGap(54, 54, 54))
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.Gro
upLayout.Alignment.LEADING)
.addComponent(jLabel5)
.addComponent(jLabel11,
javax.swing.GroupLayout.PREFERRED_SIZE, 81,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacem
ent.RELATED)))
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupL
ayout.Alignment.LEADING, false)
.addComponent(jTextField7)
.addComponent(jTextField5)
.addComponent(jTextField10,
javax.swing.GroupLayout.DEFAULT_SIZE, 210, Short.MAX_VALUE)))
.addComponent(jTextField12)))
.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE,
343, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout
.Alignment.LEADING)
.addComponent(jTextField16,
javax.swing.GroupLayout.PREFERRED_SIZE, 221,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField15,
javax.swing.GroupLayout.PREFERRED_SIZE, 221,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(10, 10, 10)
.addComponent(jLabel17,
javax.swing.GroupLayout.PREFERRED_SIZE, 151,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(115,115,115) .addGroup(jPanel2Layout.createParallelGrou
p(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jTextField17,
javax.swing.GroupLayout.PREFERRED_SIZE, 193,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField18,
javax.swing.GroupLayout.PREFERRED_SIZE, 200,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel18,
javax.swing.GroupLayout.PREFERRED_SIZE, 122,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(78,78,78) .addGroup(jPanel2Layout.createParallelGroup(j
avax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel19,
javax.swing.GroupLayout.PREFERRED_SIZE, 194,
javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel2Lay
out.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(jTextField20,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
.addComponent(jTextField19,
javax.swing.GroupLayout.Alignment.LEADING))))) .addGroup(jPanel2Layout
.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(0,15,Short.MAX_VALUE) .addGroup(jPanel2Layout.createParal
lelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADI
NG)
.addComponent(jLabel20,
javax.swing.GroupLayout.PREFERRED_SIZE, 179,
javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel
2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jTextField22,
javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, 233,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField21,
javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, 233,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(24, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel2Layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(jButton6,javax.swing.GroupLayout.PREFERRED_SIZE,181,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(38, 38, 38))))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel2Layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELA
TED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(lbl_img1,javax.swing.GroupLayout.PREFERRED_SIZE,212,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(25, 25, 25))))))
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.
LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(487, 487, 487)
.addComponent(lbl_img, javax.swing.GroupLayout.DEFAULT_SIZE, 225,
Short.MAX_VALUE)
.addGap(488, 488, 488)))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(57, 57, 57)
.addComponent(lbl_img1,javax.swing.GroupLayout.PREFERRED_SIZE,200,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(29, 29, 29)
.addComponent(jButton6,javax.swing.GroupLayout.PREFERRED_SIZE,39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jLabel6,javax.swing.GroupLayout.PREFERRED_SIZE,40,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignme
nt.LEADING)
.addComponent(jLabel4,javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel2Layout.createSequentialGroup()
.addGap(0,6,Short.MAX_VALUE) .addGroup(jPanel2Layout.cr
eateParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.PREFERRED_SIZE, 33,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEAD
ING) .addComponent(jTextField4,javax.swing.GroupLayout.PREFERRED_SIZE,29,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jTextField5,javax.swing.GroupLayout.PREFERRED_SIZE,29,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel5,javax.swing.GroupLayout.PREFERRED_SIZE,29,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addComponent(jTextField2,javax.swing.GroupLayout.PREFERRED_SIZE,28,
javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignme
nt.BASELINE)
.addComponent(jLabel3,javax.swing.GroupLayout.PREFERRED_SIZE,28,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField3,javax.swing.GroupLayout.PREFERRED_SIZE,32,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel7)
.addComponent(jTextField6,javax.swing.GroupLayout.PREFERRED_SIZE,28,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel8,javax.swing.GroupLayout.PREFERRED_SIZE,32,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField7,javax.swing.GroupLayout.PREFERRED_SIZE,31,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignme
nt.LEADING)
.addComponent(jLabel9,javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE,24,javax.swing.GroupLayout.PREFERRED_
SIZE) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.
Alignment.BASELINE)
.addComponent(jTextField8,javax.swing.GroupLayout.PREFERRED_SIZE,35,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel10)
.addComponent(jTextField9,javax.swing.GroupLayout.PREFERRED_SIZE,35,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel11,javax.swing.GroupLayout.PREFERRED_SIZE,22,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField10,javax.swing.GroupLayout.PREFERRED_SIZE,29,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(20, 20, 20)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignme
nt.BASELINE)
.addComponent(jLabel12)
.addComponent(jTextField11,javax.swing.GroupLayout.PREFERRED_SIZE,34,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel13)
.addComponent(jTextField12,javax.swing.GroupLayout.PREFERRED_SIZE,34,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(33, 33, 33)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignme
nt.BASELINE)
.addComponent(jLabel14,javax.swing.GroupLayout.PREFERRED_SIZE,37,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField13,javax.swing.GroupLayout.PREFERRED_SIZE,37,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel15)
.addComponent(jTextField14,javax.swing.GroupLayout.PREFERRED_SIZE,34,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel16,javax.swing.GroupLayout.PREFERRED_SIZE,53,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignme
nt.BASELINE)
.addComponent(jLabel17,javax.swing.GroupLayout.PREFERRED_SIZE,34,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel18)
.addComponent(jLabel19,javax.swing.GroupLayout.PREFERRED_SIZE,32,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel20,javax.swing.GroupLayout.PREFERRED_SIZE,32,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignme
nt.BASELINE)
.addComponent(jTextField15,javax.swing.GroupLayout.PREFERRED_SIZE,35,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField17,javax.swing.GroupLayout.PREFERRED_SIZE,35,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField19,javax.swing.GroupLayout.PREFERRED_SIZE,35,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField21,javax.swing.GroupLayout.PREFERRED_SIZE,38,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignme
nt.BASELINE)
.addComponent(jTextField16,javax.swing.GroupLayout.PREFERRED_SIZE,33,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField18,javax.swing.GroupLayout.PREFERRED_SIZE,33,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField20,javax.swing.GroupLayout.PREFERRED_SIZE,34,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField22,javax.swing.GroupLayout.PREFERRED_SIZE,36,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(47, 47, 47))
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.
LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(200, 200, 200)
.addComponent(lbl_img,javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(200, 200, 200)))
);
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignme
nt.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(19, 19, 19)
.addComponent(jLabel1)
.addGap(18, 18, 18)
.addComponent(jTextField1,javax.swing.GroupLayout.PREFERRED_SIZE,394,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton7,javax.swing.GroupLayout.PREFERRED_SIZE,91,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jButton5,javax.swing.GroupLayout.PREFERRED_SIZE,90,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELAT
ED)
.addComponent(jButton4)
.addGap(23, 23, 23)
.addComponent(jButton3)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELAT
ED)
.addComponent(jButton2))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignme
nt.TRAILING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jButton7, javax.swing.GroupLayout.DEFAULT_SIZE, 43,
Short.MAX_VALUE)
.addGap(1, 1, 1))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(6, 6, 6))
.addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 44,
Short.MAX_VALUE)
.addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton4, javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(jTextField1, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jButton5, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 1200,
Short.MAX_VALUE)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jButton1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
);
pack();
}private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
FIRST:event_jButton6ActionPerformed
JFileChooser chooser = new JFileChooser();
chooser.showOpenDialog(null);
File f = chooser.getSelectedFile();
filename = f.getAbsolutePath();
ImageIcon imageIcon = new ImageIcon(new
ImageIcon(filename).getImage().getScaledInstance(lbl_img1.getWidth(),
lbl_img1.getHeight(), Image.SCALE_DEFAULT));
lbl_img1.setIcon(imageIcon);
try {
File image = new File(filename);
FileInputStream fis = new FileInputStream(image);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
byte[] buf = new byte[1024];
for (int readNum; (readNum = fis.read(buf)) != -1;) {
bos.write(buf, 0, readNum);
}
person_image = bos.toByteArray();
} catch (Exception e) {
JOptionPane.showMessageDialog(null, e);
}
}//GEN-LAST:event_jButton6ActionPerformed
privatevoidjTextField1ActionPerformed(java.awt.event.ActionEventevt){//GEN-
FIRST:event_jTextField1ActionPerformed
}//GEN-LAST:event_jTextField1ActionPerformed
privatevoidjTextField1KeyReleased(java.awt.event.KeyEventevt){//GEN-
FIRST:event_jTextField1KeyReleased
// TODO add your handling code here:
try {
String sql = "select * from information where student_id=? ";
pst = conn.prepareStatement(sql);
pst.setString(1, jTextField1.getText());
rs = pst.executeQuery();
while (rs.next()) {
String add1 = rs.getString("form_id");
jTextField2.setText(add1);
String add2 = rs.getString("batch_no");
jTextField4.setText(add2);
String add3 = rs.getString("student_id");
jTextField5.setText(add3);
String add4 = rs.getString("first_name");
jTextField3.setText(add4);
String add6 = rs.getString("middle_name");
jTextField6.setText(add6);
String add7 = rs.getString("last_name");
jTextField7.setText(add7);
String add5 = rs.getString("email");
jTextField8.setText(add5);
String add8 = rs.getString("contact");
jTextField9.setText(add8);
String add9 = rs.getString("dob");
jTextField10.setText(add9);
String add10 = rs.getString("father_name");
jTextField11.setText(add10);
String add11 = rs.getString("mother_name");
jTextField12.setText(add11);
String add12 = rs.getString("permanent_add");
jTextField13.setText(add12);
String add13 = rs.getString("temporary_add");
jTextField14.setText(add13);
String add14 = rs.getString("particular_school");
jTextField15.setText(add14);
String add15 = rs.getString("particular_higherschool");
jTextField16.setText(add15);
String add16 = rs.getString("name_of_school");
jTextField17.setText(add16);
String add17 = rs.getString("name_of_higherschool");
jTextField18.setText(add17);
String add18 = rs.getString("percentage_school");
jTextField19.setText(add18);
String add19 = rs.getString("percentage_higherschool");
jTextField20.setText(add19);
String add20 = rs.getString("passed_year_school");
jTextField21.setText(add20);
String add21 = rs.getString("passed_year_higherschool");
jTextField22.setText(add21);
byte[] img = rs.getBytes("image");
ImageIconimageIcon=newImageIcon(new
ImageIcon(img).getImage().getScaledInstance(lbl_img1.getWidth(),lbl_img1.getHeight(),
Image.SCALE_SMOOTH));
lbl_img1.setIcon(imageIcon);
}
} catch (Exception e) {
} finally {
try {
rs.close();
pst.close();
} catch (Exception e) {
}
}
}//GEN-LAST:event_jTextField1KeyReleased
private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
FIRST:event_jTextField2ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField2ActionPerformed

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton2ActionPerformed
// TODO add your handling code here:
new StudentInformationSystem().setVisible(true);
dispose();
}//GEN-LAST:event_jButton2ActionPerformed

private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton5ActionPerformed
// TODO add your handling code here:
jTextField1.setText("");
jTextField2.setText("");
jTextField3.setText("");
jTextField4.setText("");
jTextField5.setText("");
jTextField6.setText("");
jTextField7.setText("");
jTextField8.setText("");
jTextField9.setText("");
jTextField10.setText("");
jTextField11.setText("");
jTextField12.setText("");
jTextField13.setText("");
jTextField14.setText("");
jTextField15.setText("");
jTextField16.setText("");
jTextField17.setText("");
jTextField18.setText("");
jTextField19.setText("");
jTextField20.setText("");
jTextField21.setText("");
jTextField22.setText("");
lbl_img1.setIcon(null);
}//GEN-LAST:event_jButton5ActionPerformed

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton4ActionPerformed
// TODO add your handling code here:
if (jTextField1.getText().equals("")) {
JOptionPane.showMessageDialog(null, "Record is Not Selected");
} else {
int p = JOptionPane.showConfirmDialog(null, "Are you sure you want to delete
record?", "Delete", JOptionPane.YES_NO_OPTION);
if (p == 0) {
String sql = "delete from information where student_id=? ";
try {
pst = conn.prepareStatement(sql);
pst.setString(1, jTextField1.getText());
pst.execute();

JOptionPane.showMessageDialog(null, "Record Deleted successfully");


jTextField1.setText("");
jTextField2.setText("");
jTextField3.setText("");
jTextField4.setText("");
jTextField5.setText("");
jTextField6.setText("");
jTextField7.setText("");
jTextField8.setText("");
jTextField9.setText("");
jTextField10.setText("");
jTextField11.setText("");
jTextField12.setText("");
jTextField13.setText("");
jTextField14.setText("");
jTextField15.setText("");
jTextField16.setText("");
jTextField17.setText("");
jTextField18.setText("");
jTextField19.setText("");
jTextField20.setText("");
jTextField21.setText("");
jTextField22.setText("");
lbl_img1.setIcon(null);
} catch (Exception e) {

JOptionPane.showMessageDialog(null, e);
} finally {

try {
rs.close();
pst.close();

} catch (Exception e) {

}
}
}
}
}//GEN-LAST:event_jButton4ActionPerformed
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
FIRST:event_jButton3ActionPerformed
// TODO add your handling code here:
if (jTextField1.getText().equals("")) {
JOptionPane.showMessageDialog(null, "Record is Not Selected");
}else{
int p = JOptionPane.showConfirmDialog(null, "Are you sure you want to
update?","Update Record",JOptionPane.YES_NO_OPTION);
if(p==0){
try{
String value0 = jTextField1.getText();
String value1 = jTextField2.getText();
String value2 = jTextField3.getText();
String value3 = jTextField4.getText();
String value4 = jTextField5.getText();
String value5 = jTextField6.getText();
String value6 = jTextField7.getText();
String value7 = jTextField8.getText();
String value8 = jTextField9.getText();
String value9 = jTextField10.getText();
String value10 = jTextField11.getText();
String value11 = jTextField12.getText();
String value12 = jTextField13.getText();
String value13 = jTextField14.getText();
String value14 = jTextField15.getText();
String value15 = jTextField17.getText();
String value16 = jTextField19.getText();
String value17 = jTextField21.getText();
String value18 = jTextField16.getText();
String value19 = jTextField18.getText();
String value20 = jTextField20.getText();
String value21 = jTextField22.getText();
String sql= "update information set form_id='"+value1+"',batch_no='"+value3+"',
student_id='"+value4+"', "
+
"first_name='"+value2+"',middle_name='"+value5+"',last_name='"+value6+"',email='"+valu
e7+"',contact= '"+value8+"', "
+ "dob='"+value9+"',father_name
='"+value10+"',mother_name='"+value11+"',permanent_add='"+value12+"',temporary_add='
"+value13+"',particular_school='"+value14+"',"
+
"name_of_school='"+value15+"',percentage_school='"+value16+"',passed_year_school='"+v
alue17+"',"
+
"name_of_higherschool='"+value19+"',percentage_higherschool='"+value20+"',passed_year_
higherschool='"+value21+"',particular_higherschool='"+value18+"'"
// + "image=?"
+ "where student_id='"+value0+"' ";
pst=conn.prepareStatement(sql);
// pst.setBytes(1,person_image);
pst.execute();
JOptionPane.showMessageDialog(null, "RecordSuccessfully Updated");
}catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}
finally {

try{
rs.close();
pst.close();

}
catch(Exception e){

}
}
}

}
}//GEN-LAST:event_jButton3ActionPerformed

private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton7ActionPerformed
// TODO add your handling code here:
new AdminView().setVisible(true);
dispose();
}//GEN-LAST:event_jButton7ActionPerformed
public static void main(String args[]) {
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(AdminIndividual.class.getName()).log(java.util.lo
gging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(AdminIndividual.class.getName()).log(java.util.lo
gging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(AdminIndividual.class.getName()).log(java.util.lo
gging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(AdminIndividual.class.getName()).log(java.util.lo
gging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new AdminIndividual().setVisible(true);
}
});
}

// Variables declaration - do not modify//GEN-BEGIN:variables


private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JButton jButton4;
private javax.swing.JButton jButton5;
private javax.swing.JButton jButton6;
private javax.swing.JButton jButton7;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel13;
private javax.swing.JLabel jLabel14;
private javax.swing.JLabel jLabel15;
private javax.swing.JLabel jLabel16;
private javax.swing.JLabel jLabel17;
private javax.swing.JLabel jLabel18;
private javax.swing.JLabel jLabel19;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel20;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField10;
private javax.swing.JTextField jTextField11;
private javax.swing.JTextField jTextField12;
private javax.swing.JTextField jTextField13;
private javax.swing.JTextField jTextField14;
private javax.swing.JTextField jTextField15;
private javax.swing.JTextField jTextField16;
private javax.swing.JTextField jTextField17;
private javax.swing.JTextField jTextField18;
private javax.swing.JTextField jTextField19;
private javax.swing.JTextField jTextField2;
private javax.swing.JTextField jTextField20;
private javax.swing.JTextField jTextField21;
private javax.swing.JTextField jTextField22;
private javax.swing.JTextField jTextField3;
private javax.swing.JTextField jTextField4;
private javax.swing.JTextField jTextField5;
private javax.swing.JTextField jTextField6;
private javax.swing.JTextField jTextField7;
private javax.swing.JTextField jTextField8;
private javax.swing.JTextField jTextField9;
private javax.swing.JLabel lbl_img;
private javax.swing.JLabel lbl_img1;
// End of variables declaration//GEN-END:variables
private ImageIcon format = null;
String filename = null;
byte[] person_image = null;

Frame: AdminView.java

Code for AdminView:

package studentinformationsystem;

import javax.swing.JOptionPane;
import java.awt.*;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.Calendar;
import java.util.GregorianCalendar;
import javax.swing.*;
import net.proteanit.sql.DbUtils;

public class AdminView extends javax.swing.JFrame {

Connection conn = null;


ResultSet rs = null;
PreparedStatement pst = null;
public AdminView() {
initComponents();
conn = dbconnect.java_db();
Toolkit toolkit = getToolkit();
Dimension size = toolkit.getScreenSize();
// setLocation(size.width / 2 - getWidth() / 2,
//size.height / 2 - getHeight() / 2);
setLocation(60, 0);
setResizable(false);
setTitle("Student Information System");
Update_table3();

private void Update_table3() {


try {

String sql = "select * from information";

pst = conn.prepareStatement(sql);
rs = pst.executeQuery();

jTable1.setModel(DbUtils.resultSetToTableModel(rs));

} catch (Exception e) {
JOptionPane.showMessageDialog(null, e);
} finally {

try {
rs.close();
pst.close();

} catch (Exception e) {

}
}
}

@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated
Code">//GEN-BEGIN:initComponents
private void initComponents() {

panel1 = new java.awt.Panel();


label1 = new java.awt.Label();
label2 = new java.awt.Label();
jButton4 = new javax.swing.JButton();
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jPanel2 = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_C
LOSE);
panel1.setBackground(new java.awt.Color(0, 153, 255));
label1.setText("label1");
label2.setText("label2");
jButton4.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/studentinformat
ionsystem/header.jpg"))); // NOI18N
jButton4.setBorderPainted(false);
jButton4.setContentAreaFilled(false);
jButton4.setDefaultCapable(false);
jButton4.setFocusPainted(false);
jButton4.setFocusable(false);
jButton4.setHideActionText(true);
jButton4.setRequestFocusEnabled(false);
jButton4.setRolloverEnabled(false);
jButton4.setVerifyInputWhenFocusTarget(false);
jButton4.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEvent evt) {
jButton4ActionPerformed(evt);
}
});

javax.swing.GroupLayout panel1Layout = new


javax.swing.GroupLayout(panel1);
panel1.setLayout(panel1Layout);

panel1Layout.setHorizontalGroup( panel1Layout.create
ParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jButton4,
javax.swing.GroupLayout.PREFERRED_SIZE, 1212,
javax.swing.GroupLayout.PREFERRED_SIZE)
);

panel1Layout.setVerticalGroup( panel1Layout.createP
arallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILI
NG, panel1Layout.createSequentialGroup()
.addComponent(jButton4)
.addGap(0, 0, Short.MAX_VALUE))
);

jPanel1.setBackground(new java.awt.Color(0, 153,


255));

jLabel1.setFont(new java.awt.Font("Tahoma", 1,
14)); // NOI18N
jLabel1.setText("Search Student ByID");

jTextField1.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEvent evt) {
jTextField1ActionPerformed(evt);
}
});
jTextField1.addKeyListener(new
java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent
evt) {
jTextField1KeyReleased(evt);
}
});

jButton1.setBackground(new java.awt.Color(51, 255,


0));
jButton1.setFont(new java.awt.Font("Tahoma", 1,
12)); // NOI18N
jButton1.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/studentinformat
ionsystem/back.png"))); // NOI18N
jButton1.setText("Back");
jButton1.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton2.setBackground(new java.awt.Color(102, 255,
51));
jButton2.setFont(new java.awt.Font("Tahoma", 1,
12)); // NOI18N
jButton2.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/studentinformat
ionsystem/erase-128.png"))); // NOI18N
jButton2.setText("Reset");
jButton2.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});

jButton3.setBackground(new java.awt.Color(102, 255,


0));
jButton3.setFont(new java.awt.Font("Tahoma", 1,
12)); // NOI18N
jButton3.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/studentinformat
ionsystem/person-icon.png"))); // NOI18N
jButton3.setText(" Show Individual");
jButton3.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});

javax.swing.GroupLayout jPanel1Layout = new


javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alig
nment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(51, 51, 51)
.addComponent(jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE, 159,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.Compo
nentPlacement.UNRELATED)
.addComponent(jTextField1,
javax.swing.GroupLayout.PREFERRED_SIZE, 379,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.Compo
nentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(jButton3)
.addGap(27, 27, 27)
.addComponent(jButton2)
.addGap(18, 18, 18)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 89,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(53, 53, 53))
);
jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alig
nment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(ja
vax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGr
oup()
.addGap(2, 2, 2)
.addComponent(jButton2,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(jPanel1Layout.createParallelGrou
p(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE, 36,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField1,
javax.swing.GroupLayout.PREFERRED_SIZE, 36,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignmen
t.TRAILING, jPanel1Layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(jButton3))
.addComponent(jButton1,
javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);

jPanel2.setBackground(new java.awt.Color(0, 153,


255));

jTable1.setBackground(new java.awt.Color(204, 255,


204));
jTable1.setFont(new java.awt.Font("Tahoma", 0,
14)); // NOI18N
jTable1.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"
}
));
jTable1.setIntercellSpacing(new java.awt.Dimension(2,
5));
jScrollPane1.setViewportView(jTable1);

javax.swing.GroupLayout jPanel2Layout = new


javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alig
nment.LEADING)
.addComponent(jScrollPane1)
);
jPanel2Layout.setVerticalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alig
nment.LEADING)
.addComponent(jScrollPane1,
javax.swing.GroupLayout.DEFAULT_SIZE, 483, Short.MAX_VALUE)
);

javax.swing.GroupLayout layout = new


javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.L
EADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swi
ng.GroupLayout.Alignment.LEADING, false)
.addComponent(panel1,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.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(6, 6, 6))
);
layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.L
EADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILI
NG, layout.createSequentialGroup()
.addComponent(panel1,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.Compo
nentPlacement.RELATED)
.addComponent(jPanel1,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jPanel2,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
);

pack();
}// </editor-fold>//GEN-END:initComponents

private void
jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
}//GEN-LAST:event_jButton4ActionPerformed

private void
jButton3ActionPerformed(java.awt.event.ActionEvent evt)
dispose();

}//GEN-LAST:event_jButton3ActionPerformed

private void
jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
new AdminFrame();
dispose();
}//GEN-LAST:event_jButton1ActionPerformed

private void
jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {
}//GEN-LAST:event_jTextField1ActionPerformed
private void
jTextField1KeyReleased(java.awt.event.KeyEvent evt)
{ try{

String sql = "select* from information where


student_id = ? ";
pst=conn.prepareStatement(sql);
pst.setString(1,jTextField1.getText());
rs=pst.executeQuery();

jTable1.setModel(DbUtils.resultSetToTableModel(rs));
}catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}
finally {

try{

rs.close();
pst.close();

}
catch(Exception e){

}
}
}//GEN-LAST:event_jTextField1KeyReleased

private void
jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
Update_table3();
jTextField1.setText("");
}//GEN-LAST:event_jButton2ActionPerforme
public static void main(String args[]) {
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(AdminView.class.getName()).
log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(AdminView.class.getName()).
log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(AdminView.class.getName()).
log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException
ex) {

java.util.logging.Logger.getLogger(AdminView.class.getName()).
log(java.util.logging.Level.SEVERE, null, ex);
}

java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new AdminView().setVisible(true);

}
});
}
// Variables declaration - do not modify//GEN-
BEGIN:variables
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JButton jButton4;
private javax.swing.JLabel jLabel1;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTable jTable1;
private javax.swing.JTextField jTextField1;
private java.awt.Label label1;
private java.awt.Label label2;
private java.awt.Panel panel1;
// End of variables declaration//GEN-END:variables
}

Frame: UserIndividual.java
Code for UserIndividual:

package studentinformationsystem;

import net.proteanit.sql.DbUtils;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import javax.imageio.ImageIO;
import javax.swing.*;
public class UserIndividual extends javax.swing.JFrame {
Connection conn = null;
ResultSet rs = null;
PreparedStatement pst = null;
public UserIndividual() {
initComponents();
conn = dbconnect.java_db();
Toolkit toolkit = getToolkit();
Dimension size = toolkit.getScreenSize();
setLocation(size.width / 2 - getWidth() / 2,
size.height / 2 - getHeight() / 2);
setResizable(false);
setTitle("Student Information System");
}
@SuppressWarnings("unchecked")
GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jButton4 = new javax.swing.JButton();
jPanel2 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jPanel3 = new javax.swing.JPanel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jTextField2 = new javax.swing.JTextField();
jLabel4 = new javax.swing.JLabel();
jTextField3 = new javax.swing.JTextField();
jLabel5 = new javax.swing.JLabel();
jTextField4 = new javax.swing.JTextField();
jTextField5 = new javax.swing.JTextField();
jLabel7 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jTextField6 = new javax.swing.JTextField();
jLabel8 = new javax.swing.JLabel();
jTextField7 = new javax.swing.JTextField();
jLabel9 = new javax.swing.JLabel();
jTextField8 = new javax.swing.JTextField();
jLabel10 = new javax.swing.JLabel();
jTextField9 = new javax.swing.JTextField();
jLabel11 = new javax.swing.JLabel();
jTextField10 = new javax.swing.JTextField();
jLabel12 = new javax.swing.JLabel();
jTextField11 = new javax.swing.JTextField();
jLabel13 = new javax.swing.JLabel();
jTextField12 = new javax.swing.JTextField();
jLabel14 = new javax.swing.JLabel();
jLabel15 = new javax.swing.JLabel();
jTextField13 = new javax.swing.JTextField();
jTextField14 = new javax.swing.JTextField();
jLabel16 = new javax.swing.JLabel();
jLabel17 = new javax.swing.JLabel();
lbl_img1 = new javax.swing.JLabel();
jLabel19 = new javax.swing.JLabel();
jLabel20 = new javax.swing.JLabel();
jTextField15 = new javax.swing.JTextField();
jTextField16 = new javax.swing.JTextField();
jTextField17 = new javax.swing.JTextField();
jTextField18 = new javax.swing.JTextField();
jLabel21 = new javax.swing.JLabel();
jTextField19 = new javax.swing.JTextField();
jTextField20 = new javax.swing.JTextField();
jTextField21 = new javax.swing.JTextField();
jTextField22 = new javax.swing.JTextField();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_C
LOSE);

jPanel1.setBackground(new java.awt.Color(0, 153,


255));

jButton4.setBackground(new java.awt.Color(0, 102,


255));
jButton4.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/studentinformat
ionsystem/headeruser.jpg"))); // NOI18N
jButton4.setActionCommand("");

javax.swing.GroupLayout jPanel1Layout = new


javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alig
nment.LEADING)
.addComponent(jButton4,
javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
);
jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alig
nment.LEADING)
.addComponent(jButton4)
);

jPanel2.setBackground(new java.awt.Color(0, 153,


255));

jLabel1.setFont(new java.awt.Font("Tahoma", 1,
12)); // NOI18N
jLabel1.setText("Search Student By ID");

jTextField1.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEvent evt) {
jTextField1ActionPerformed(evt);
}
});
jTextField1.addKeyListener(new
java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent
evt) {
jTextField1KeyReleased(evt);
}
});

jButton1.setBackground(new java.awt.Color(204, 204,


204));
jButton1.setFont(new java.awt.Font("Tahoma", 1,
12)); // NOI18N
jButton1.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/studentinformat
ionsystem/logout.png"))); // NOI18N
jButton1.setText("Logged Out");
jButton1.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

jButton2.setBackground(new java.awt.Color(204, 204,


204));
jButton2.setFont(new java.awt.Font("Tahoma", 1,
12)); // NOI18N
jButton2.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/studentinformat
ionsystem/erase-128.png"))); // NOI18N
jButton2.setText("Reset");
jButton2.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});

jButton3.setBackground(new java.awt.Color(204, 204,


204));
jButton3.setFont(new java.awt.Font("Tahoma", 1,
12)); // NOI18N
jButton3.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/studentinformat
ionsystem/back.png"))); // NOI18N
jButton3.setText("Back");
jButton3.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});

javax.swing.GroupLayout jPanel2Layout = new


javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alig
nment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(77, 77, 77)
.addComponent(jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE, 157,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.Compo
nentPlacement.RELATED)
.addComponent(jTextField1,
javax.swing.GroupLayout.PREFERRED_SIZE, 387,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(158, 158, 158)
.addComponent(jButton3,
javax.swing.GroupLayout.PREFERRED_SIZE, 117,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jButton2,
javax.swing.GroupLayout.PREFERRED_SIZE, 98,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jButton1,
javax.swing.GroupLayout.DEFAULT_SIZE, 137, Short.MAX_VALUE)
.addContainerGap())
);
jPanel2Layout.setVerticalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alig
nment.LEADING)
.addGroup(jPanel2Layout.createParallelGroup(javax.
swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jTextField1,
javax.swing.GroupLayout.PREFERRED_SIZE, 40,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 40,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton2,
javax.swing.GroupLayout.PREFERRED_SIZE, 41,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton3,
javax.swing.GroupLayout.PREFERRED_SIZE, 41,
javax.swing.GroupLayout.PREFERRED_SIZE))
);

jPanel3.setBackground(new java.awt.Color(204, 255,


204));

jLabel2.setFont(new java.awt.Font("Tahoma", 1,
18)); // NOI18N
jLabel2.setForeground(new java.awt.Color(51, 51,
255));
jLabel2.setText("Student Details Information");

jLabel3.setFont(new java.awt.Font("Tahoma", 1,
12)); // NOI18N
jLabel3.setText("First name");

jTextField2.setFont(new java.awt.Font("Tahoma", 1,
12));
jLabel4.setFont(new java.awt.Font("Tahoma", 1,
12)); // NOI18N
jLabel4.setText("Batch (Year)");

jTextField3.setFont(new java.awt.Font("Tahoma", 1,
12));

jLabel5.setFont(new java.awt.Font("Tahoma", 1,
12)); // NOI18N
jLabel5.setText("Student ID");

jTextField4.setFont(new java.awt.Font("Tahoma", 1,
12)); jTextField5.setFont(new java.awt.Font("Tahoma",
1, 12)); // NOI18N

jLabel7.setFont(new java.awt.Font("Tahoma", 1,
12)); // NOI18N
jLabel7.setText("Form no.");

jLabel6.setFont(new java.awt.Font("Tahoma", 1,
12)); // NOI18N
jLabel6.setText("Middle Name");
jTextField6.setFont(new java.awt.Font("Tahoma", 1,
12));
jLabel8.setFont(new java.awt.Font("Tahoma", 1,
12)); // NOI18N
jLabel8.setText("Last Name");

jTextField7.setFont(new java.awt.Font("Tahoma", 1,
12));
jLabel9.setFont(new java.awt.Font("Tahoma", 1,
12)); // NOI18N
jLabel9.setText("Email");

jTextField8.setFont(new java.awt.Font("Tahoma", 1,
12));
jTextField8.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEvent evt) {
jTextField8ActionPerformed(evt);
}
});

jLabel10.setFont(new java.awt.Font("Tahoma", 1, 12));


jLabel10.setText("Contact no");

jTextField9.setFont(new java.awt.Font("Tahoma", 1,
12));

jLabel11.setFont(new java.awt.Font("Tahoma", 1, 12));


jLabel11.setText("Date Of Birth");

jTextField10.setFont(new java.awt.Font("Tahoma", 1,
12)); jTextField10.setText("Year/month/day");

jLabel12.setFont(new java.awt.Font("Tahoma", 1, 12));


jLabel12.setText("Father Name");

jTextField11.setFont(new java.awt.Font("Tahoma", 1,
12));

jLabel13.setFont(new java.awt.Font("Tahoma", 1, 12));


jLabel13.setText("Mother Name");

jTextField12.setFont(new java.awt.Font("Tahoma", 1,
12));
jLabel14.setFont(new java.awt.Font("Tahoma", 1, 12));
jLabel14.setText("Temporary Address");

jLabel15.setFont(new java.awt.Font("Tahoma", 1, 12));


jLabel15.setText("Permanent Address");
jTextField13.setFont(new java.awt.Font("Tahoma", 1,
12));
jTextField14.setFont(new java.awt.Font("Tahoma", 1,
12));
jLabel16.setFont(new java.awt.Font("Tahoma", 1, 14));
jLabel16.setText("Level");

jLabel17.setFont(new java.awt.Font("Tahoma", 1, 18));


jLabel17.setForeground(new java.awt.Color(51, 51, 255));
jLabel17.setText("Academic Details:");

lbl_img1.setFont(new java.awt.Font("Tahoma", 1, 18));


lbl_img1.setForeground(new java.awt.Color(51, 51, 255));
lbl_img1.setText("Display Image");

jLabel19.setFont(new java.awt.Font("Tahoma", 1, 14));


jLabel19.setText("Passed Year");

jLabel20.setFont(new java.awt.Font("Tahoma", 1, 14));


jLabel20.setText("Name of Institute");

jTextField15.setFont(new java.awt.Font("Tahoma", 1,
12));

jTextField16.setFont(new java.awt.Font("Tahoma", 1,
12));
jTextField17.setFont(new java.awt.Font("Tahoma", 1,
12));
jTextField18.setFont(new java.awt.Font("Tahoma", 1,
12));
jLabel21.setFont(new java.awt.Font("Tahoma", 1, 14));
jLabel21.setText("Percentage %");

jTextField19.setFont(new java.awt.Font("Tahoma", 1,
12));
jTextField20.setFont(new java.awt.Font("Tahoma", 1,
12));
jTextField21.setFont(new java.awt.Font("Tahoma", 1,
12));
jTextField22.setFont(new java.awt.Font("Tahoma", 1,
12));
javax.swing.GroupLayout jPanel3Layout = new
javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(

jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alig
nment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel3Layout.createParallelGroup(ja
vax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGr
oup()
.addGroup(jPanel3Layout.createParallel
Group(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(javax.swing.GroupLayout.
Alignment.LEADING, jPanel3Layout.createSequentialGroup()
.addGroup(jPanel3Layout.create
ParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addGroup(jPanel3Layout.cr
eateSequentialGroup()
.addGroup(jPanel3Layou
t.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(jPanel3L
ayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TR
AILING, false)
.addGroup(java
x.swing.GroupLayout.Alignment.LEADING,
jPanel3Layout.createSequentialGroup()
.addCompon
ent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 73,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPrefer
redGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addCompon
ent(jTextField5))
.addGroup(java
x.swing.GroupLayout.Alignment.LEADING,
jPanel3Layout.createSequentialGroup()
.addGap(6,
6, 6)
.addCompon
ent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 73,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPrefer
redGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addCompon
ent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 125,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel3L
ayout.createSequentialGroup()
.addComponent(
jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 73,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredG
ap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(
jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, 142,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(18, 18, 18)
.addGroup(jPanel3Layou
t.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILI
NG)
.addGroup(jPanel3L
ayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LE
ADING, false)
.addGroup(jPan
el3Layout.createSequentialGroup()
.addCompon
ent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 83,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPrefer
redGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addCompon
ent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 148,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPan
el3Layout.createSequentialGroup()
.addCompon
ent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 81,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPrefer
redGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addCompon
ent(jTextField6)))
.addGroup(jPanel3L
ayout.createSequentialGroup()
.addComponent(
jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 80,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredG
ap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(
jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, 149,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(65, 65, 65))
.addGroup(javax.swing.Grou
pLayout.Alignment.TRAILING,
jPanel3Layout.createSequentialGroup()
.addGroup(jPanel3Layou
t.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILI
NG)
.addGroup(jPanel3L
ayout.createSequentialGroup()
.addComponent(
jLabel15)
.addPreferredG
ap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(
jLabel14))
.addGroup(jPanel3L
ayout.createSequentialGroup()
.addComponent(
jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 96,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredG
ap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(
jTextField14, javax.swing.GroupLayout.PREFERRED_SIZE, 217,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredG
ap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(
jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 103,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax
.swing.LayoutStyle.ComponentPlacement.RELATED)))
.addGroup(jPanel3Layout.create
ParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.cr
eateParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layou
t.createSequentialGroup()
.addGroup(jPanel3L
ayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LE
ADING)
.addComponent(
jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 71,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(
jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 79,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(
jLabel11))
.addGap(37, 37,
37)
.addGroup(jPanel3L
ayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LE
ADING)
.addComponent(
jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, 219,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(
jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 219,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(
jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, 219,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addComponent(jTextFie
ld12, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, 275,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel3Layout.cr
eateSequentialGroup()
.addGap(62, 62, 62)
.addComponent(jTextFie
ld13, javax.swing.GroupLayout.PREFERRED_SIZE, 279,
javax.swing.GroupLayout.PREFERRED_SIZE))))
.addComponent(jLabel2,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.PREFERRED_SIZE, 286,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(javax.swing.GroupLayout.
Alignment.LEADING, jPanel3Layout.createSequentialGroup()
.addGap(142, 142, 142)
.addComponent(jTextField11,
javax.swing.GroupLayout.PREFERRED_SIZE, 245,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.
Alignment.LEADING, jPanel3Layout.createSequentialGroup()
.addGroup(jPanel3Layout.create
ParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.cr
eateSequentialGroup()
.addGroup(jPanel3Layou
t.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jTex
tField22, javax.swing.GroupLayout.PREFERRED_SIZE, 233,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLab
el16, javax.swing.GroupLayout.PREFERRED_SIZE, 96,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(101, 101, 101)
.addGroup(jPanel3Layou
t.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jTex
tField15, javax.swing.GroupLayout.PREFERRED_SIZE, 233,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTex
tField19, javax.swing.GroupLayout.PREFERRED_SIZE, 233,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLab
el20)))
.addComponent(jTextField18
, javax.swing.GroupLayout.PREFERRED_SIZE, 233,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(61, 61, 61)
.addGroup(jPanel3Layout.create
ParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jTextField16
, javax.swing.GroupLayout.PREFERRED_SIZE, 233,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField20
, javax.swing.GroupLayout.PREFERRED_SIZE, 233,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel21,
javax.swing.GroupLayout.PREFERRED_SIZE, 127,
javax.swing.GroupLayout.PREFERRED_SIZE))))
.addPreferredGap(javax.swing.LayoutSty
le.ComponentPlacement.RELATED, 15, Short.MAX_VALUE)
.addGroup(jPanel3Layout.createParallel
Group(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.
Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
.addGroup(jPanel3Layout.create
ParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jTextField17
, javax.swing.GroupLayout.PREFERRED_SIZE, 233,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel19,
javax.swing.GroupLayout.PREFERRED_SIZE, 131,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(33, 33, 33))
.addGroup(javax.swing.GroupLayout.
Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
.addComponent(lbl_img1,
javax.swing.GroupLayout.PREFERRED_SIZE, 195,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(25, 25, 25))
.addGroup(jPanel3Layout.createSequ
entialGroup()
.addComponent(jTextField21,
javax.swing.GroupLayout.PREFERRED_SIZE, 233,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())))
.addGroup(jPanel3Layout.createSequentialGr
oup()
.addComponent(jLabel17,
javax.swing.GroupLayout.PREFERRED_SIZE, 196,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayo
ut.DEFAULT_SIZE, Short.MAX_VALUE))))
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alig
nment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jLabel2,
javax.swing.GroupLayout.PREFERRED_SIZE, 34,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel3Layout.createParallelGroup(ja
vax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel4,
javax.swing.GroupLayout.PREFERRED_SIZE, 27,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel3Layout.createParallelGrou
p(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jTextField2,
javax.swing.GroupLayout.PREFERRED_SIZE, 40,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel7,
javax.swing.GroupLayout.PREFERRED_SIZE, 26,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignmen
t.TRAILING,
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alig
nment.BASELINE)
.addComponent(jTextField4,
javax.swing.GroupLayout.PREFERRED_SIZE, 40,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel5,
javax.swing.GroupLayout.PREFERRED_SIZE, 28,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jTextField3,
javax.swing.GroupLayout.PREFERRED_SIZE, 40,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel3Layout.createParallelGroup(ja
vax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGr
oup()
.addPreferredGap(javax.swing.LayoutSty
le.ComponentPlacement.UNRELATED)
.addGroup(jPanel3Layout.createParallel
Group(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 26,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField5,
javax.swing.GroupLayout.PREFERRED_SIZE, 38,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel6,
javax.swing.GroupLayout.PREFERRED_SIZE, 38,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField6,
javax.swing.GroupLayout.PREFERRED_SIZE, 38,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel8,
javax.swing.GroupLayout.PREFERRED_SIZE, 38,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField7,
javax.swing.GroupLayout.PREFERRED_SIZE, 38,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(22, 22, 22)
.addGroup(jPanel3Layout.createParallel
Group(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(jPanel3Layout.createPara
llelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel10,
javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, 40,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel3Layout.create
ParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jTextField9,
javax.swing.GroupLayout.PREFERRED_SIZE, 40,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel11)
.addComponent(jTextField10
, javax.swing.GroupLayout.PREFERRED_SIZE, 40,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addComponent(jLabel9,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jTextField8))
.addGap(18, 18, 18)
.addGroup(jPanel3Layout.createParallel
Group(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createPara
llelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel12,
javax.swing.GroupLayout.PREFERRED_SIZE, 34,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField14,
javax.swing.GroupLayout.PREFERRED_SIZE, 34,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel3Layout.createPara
llelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel13,
javax.swing.GroupLayout.PREFERRED_SIZE, 43,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField12,
javax.swing.GroupLayout.PREFERRED_SIZE, 34,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutSty
le.ComponentPlacement.UNRELATED)
.addGroup(jPanel3Layout.createParallel
Group(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jTextField11,
javax.swing.GroupLayout.PREFERRED_SIZE, 34,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel3Layout.createPara
llelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jTextField13,
javax.swing.GroupLayout.PREFERRED_SIZE, 37,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel14,
javax.swing.GroupLayout.PREFERRED_SIZE, 34,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jLabel15,
javax.swing.GroupLayout.PREFERRED_SIZE, 34,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel3Layout.createParallel
Group(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequ
entialGroup()
.addGap(15, 15, 15)
.addComponent(jLabel17,
javax.swing.GroupLayout.PREFERRED_SIZE, 34,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.L
ayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel16,
javax.swing.GroupLayout.PREFERRED_SIZE, 34,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.L
ayoutStyle.ComponentPlacement.RELATED))
.addGroup(javax.swing.GroupLayout.
Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
.addGap(11, 11, 11)
.addGroup(jPanel3Layout.create
ParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.Grou
pLayout.Alignment.TRAILING,
jPanel3Layout.createSequentialGroup()
.addComponent(jLabel19
, javax.swing.GroupLayout.PREFERRED_SIZE, 34,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(19, 19, 19))
.addGroup(javax.swing.Grou
pLayout.Alignment.TRAILING,
jPanel3Layout.createSequentialGroup()
.addGroup(jPanel3Layou
t.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLab
el20, javax.swing.GroupLayout.PREFERRED_SIZE, 34,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLab
el21, javax.swing.GroupLayout.PREFERRED_SIZE, 34,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax
.swing.LayoutStyle.ComponentPlacement.UNRELATED)))))
.addGroup(jPanel3Layout.createParallel
Group(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jTextField15,
javax.swing.GroupLayout.PREFERRED_SIZE, 43,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField16,
javax.swing.GroupLayout.PREFERRED_SIZE, 43,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField17,
javax.swing.GroupLayout.PREFERRED_SIZE, 43,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField22,
javax.swing.GroupLayout.PREFERRED_SIZE, 43,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel3Layout.createSequentialGr
oup()
.addGap(21, 21, 21)
.addComponent(lbl_img1,
javax.swing.GroupLayout.PREFERRED_SIZE, 176,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(18, 18, 18)
.addGroup(jPanel3Layout.createParallelGroup(ja
vax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jTextField18,
javax.swing.GroupLayout.PREFERRED_SIZE, 43,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField19,
javax.swing.GroupLayout.PREFERRED_SIZE, 43,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField20,
javax.swing.GroupLayout.PREFERRED_SIZE, 43,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField21,
javax.swing.GroupLayout.PREFERRED_SIZE, 43,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(62, Short.MAX_VALUE))
);

javax.swing.GroupLayout layout = new


javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.L
EADING)
.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)
.addComponent(jPanel3,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.L
EADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel1,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.Compo
nentPlacement.RELATED)
.addComponent(jPanel2,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.Compo
nentPlacement.RELATED)
.addComponent(jPanel3,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);

pack();
}// </editor-fold>//GEN-END:initComponents

private void
jTextField1ActionPerformed(java.awt.event.ActionEvent evt)
{//GEN-FIRST:event_jTextField1ActionPerformed

}//GEN-LAST:event_jTextField1ActionPerformed

private void
jButton2ActionPerformed(java.awt.event.ActionEvent evt)
{//GEN-FIRST:event_jButton2ActionPerformed
jTextField1.setText("");
jTextField2.setText("");
jTextField3.setText("");
jTextField4.setText("");
jTextField5.setText("");
jTextField6.setText("");
jTextField7.setText("");
jTextField8.setText("");
jTextField9.setText("");
jTextField10.setText("");
jTextField11.setText("");
jTextField12.setText("");
jTextField13.setText("");
jTextField14.setText("");
jTextField15.setText("");
jTextField16.setText("");
jTextField17.setText("");
jTextField18.setText("");
jTextField19.setText("");
jTextField20.setText("");
jTextField21.setText("");
jTextField22.setText("");
lbl_img1.setIcon(null);

}//GEN-LAST:event_jButton2ActionPerformed

private void
jTextField8ActionPerformed(java.awt.event.ActionEvent evt) {
}//GEN-LAST:event_jTextField8ActionPerformed

private void
jButton3ActionPerformed(java.awt.event.ActionEvent evt)
{//GEN-FIRST:event_jButton3ActionPerformed
new UserView().setVisible(true);
dispose();

}//GEN-LAST:event_jButton3ActionPerformed

private void
jButton1ActionPerformed(java.awt.event.ActionEvent evt)
{//GEN-FIRST:event_jButton1ActionPerformed
new StudentInformationSystem().setVisible(true);
dispose();
}//GEN-LAST:event_jButton1ActionPerformed

private void
jTextField1KeyReleased(java.awt.event.KeyEvent evt) {//GEN-
FIRST:event_jTextField1KeyReleased
ResultSet rs = null;
PreparedStatement pst = null;

try (Connection conn = dbconnect.java_db()) {


String sql = "select * from information where
student_id=? ";
pst = conn.prepareStatement(sql);
pst.setString(1, jTextField1.getText());
rs = pst.executeQuery();
while (rs.next()) {

String add1 = rs.getString("form_id");


jTextField2.setText(add1);
String add2 = rs.getString("batch_no");
jTextField3.setText(add2);
String add3 = rs.getString("student_id");
jTextField4.setText(add3);
String add4 = rs.getString("first_name");
jTextField5.setText(add4);
String add5 = rs.getString("middle_name");
jTextField6.setText(add5);
String add6 = rs.getString("last_name");
jTextField7.setText(add6);
String add7 = rs.getString("email");
jTextField8.setText(add7);
String add8 = rs.getString("contact");
jTextField9.setText(add8);
String add9 = rs.getString("dob");
jTextField10.setText(add9);
String add10 = rs.getString("father_name");
jTextField14.setText(add10);
String add11 = rs.getString("mother_name");
jTextField12.setText(add11);
String add12 = rs.getString("permanent_add");
jTextField11.setText(add12);
String add13 = rs.getString("temporary_add");
jTextField13.setText(add13);
String add14 =
rs.getString("particular_school");
jTextField22.setText(add14);
String add15 =
rs.getString("particular_higherschool");
jTextField18.setText(add15);
String add16 = rs.getString("name_of_school");
jTextField15.setText(add16);
String add17 =
rs.getString("name_of_higherschool");
jTextField19.setText(add17);
String add18 =
rs.getString("percentage_school");
jTextField16.setText(add18);
String add19 =
rs.getString("percentage_higherschool");
jTextField20.setText(add19);
String add20 =
rs.getString("passed_year_school");
jTextField17.setText(add20);
String add21 =
rs.getString("passed_year_higherschool");
jTextField21.setText(add21);
byte[] img = rs.getBytes("image");
ImageIcon imageIcon = new ImageIcon(new
ImageIcon(img).getImage().getScaledInstance(lbl_img1.getWidth(
), lbl_img1.getHeight(), Image.SCALE_SMOOTH));
lbl_img1.setIcon(imageIcon);
}
} catch (Exception e) {

} finally {

try {

rs.close();
pst.close();

} catch (Exception e) {

}
}

}//GEN-LAST:event_jTextField1KeyReleased

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new UserIndividual().setVisible(true);
}
});
}

GEN-BEGIN:variables
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JButton jButton4;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel13;
private javax.swing.JLabel jLabel14;
private javax.swing.JLabel jLabel15;
private javax.swing.JLabel jLabel16;
private javax.swing.JLabel jLabel17;
private javax.swing.JLabel jLabel19;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel20;
private javax.swing.JLabel jLabel21;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField10;
private javax.swing.JTextField jTextField11;
private javax.swing.JTextField jTextField12;
private javax.swing.JTextField jTextField13;
private javax.swing.JTextField jTextField14;
private javax.swing.JTextField jTextField15;
private javax.swing.JTextField jTextField16;
private javax.swing.JTextField jTextField17;
private javax.swing.JTextField jTextField18;
private javax.swing.JTextField jTextField19;
private javax.swing.JTextField jTextField2;
private javax.swing.JTextField jTextField20;
private javax.swing.JTextField jTextField21;
private javax.swing.JTextField jTextField22;
private javax.swing.JTextField jTextField3;
private javax.swing.JTextField jTextField4;
private javax.swing.JTextField jTextField5;
private javax.swing.JTextField jTextField6;
private javax.swing.JTextField jTextField7;
private javax.swing.JTextField jTextField8;
private javax.swing.JTextField jTextField9;
private javax.swing.JLabel lbl_img1;
// End of variables declaration//GEN-END:variables
}

Frame: UserView.java
Code forUserView:

package studentinformationsystem;
import javax.swing.JOptionPane;
import java.awt.*;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.Calendar;
import java.util.GregorianCalendar;
import javax.swing.*;
import net.proteanit.sql.DbUtils;

public class UserView extends javax.swing.JFrame {

Connection conn = null;


ResultSet rs = null;
PreparedStatement pst = null;
public UserView() {
initComponents();
conn = dbconnect.java_db();
Toolkit toolkit = getToolkit();
Dimension size = toolkit.getScreenSize();
setLocation(size.width / 2 - getWidth() / 2,
size.height / 2 - getHeight() / 2);
setResizable(false);
setTitle("Student Information System");
Update_table3();

private void Update_table3() {


try {
String sql = "select * from information";

pst = conn.prepareStatement(sql);
rs = pst.executeQuery();

jTable1.setModel(DbUtils.resultSetToTableModel(rs));

} catch (Exception e) {
JOptionPane.showMessageDialog(null, e);
} finally {

try {
rs.close();
pst.close();

} catch (Exception e) {

}
}
}
@SuppressWarnings("unchecked")
GEN-BEGIN:initComponents
private void initComponents() {

jPanel2 = new javax.swing.JPanel();


jLabel1 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jPanel1 = new javax.swing.JPanel();
jButton4 = new javax.swing.JButton();
jPanel3 = new javax.swing.JPanel();
jPanel4 = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_C
LOSE);

jPanel2.setBackground(new java.awt.Color(0, 153,


255));

jLabel1.setFont(new java.awt.Font("Tahoma", 1,
14)); // NOI18N
jLabel1.setText("Search Student By ID");

jTextField1.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEvent evt) {
jTextField1ActionPerformed(evt);
}
});
jTextField1.addKeyListener(new
java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent
evt) {
jTextField1KeyReleased(evt);
}
});

jButton1.setBackground(new java.awt.Color(102, 255,


0));
jButton1.setFont(new java.awt.Font("Tahoma", 1, 14));
jButton1.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/studentinformat
ionsystem/logout.png"))); // NOI18N
jButton1.setText("Logout");
jButton1.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

jButton2.setBackground(new java.awt.Color(153, 255,


0));
jButton2.setFont(new java.awt.Font("Tahoma", 1,
14)); // NOI18N
jButton2.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/studentinformat
ionsystem/person-icon.png"))); // NOI18N
jButton2.setText("Show Individual");
jButton2.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});

jButton3.setBackground(new java.awt.Color(102, 255,


0));
jButton3.setFont(new java.awt.Font("Tahoma", 1, 14));
jButton3.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/studentinformat
ionsystem/erase-128.png"))); // NOI18N
jButton3.setText("Reset");
jButton3.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});

javax.swing.GroupLayout jPanel2Layout = new


javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alig
nment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(69, 69, 69)
.addComponent(jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE, 162,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.Compo
nentPlacement.RELATED)
.addComponent(jTextField1,
javax.swing.GroupLayout.PREFERRED_SIZE, 385,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.Compo
nentPlacement.RELATED, 129, Short.MAX_VALUE)
.addComponent(jButton2)
.addGap(18, 18, 18)
.addComponent(jButton3)
.addGap(18, 18, 18)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 128,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jPanel2Layout.setVerticalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alig
nment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel2Layout.createParallelGroup(ja
vax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton1,
javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton2)
.addComponent(jButton3,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jTextField1))
.addContainerGap())
);

jPanel1.setBackground(new java.awt.Color(0, 153,


255));

jButton4.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/studentinformat
ionsystem/headeruser.jpg"))); // NOI18N

javax.swing.GroupLayout jPanel1Layout = new


javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alig
nment.LEADING)
.addComponent(jButton4,
javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
);
jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alig
nment.LEADING)
.addComponent(jButton4,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);

jPanel3.setBackground(new java.awt.Color(51, 153,


255));

javax.swing.GroupLayout jPanel3Layout = new


javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(

jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alig
nment.LEADING)
.addGap(0, 0, Short.MAX_VALUE)
);
jPanel3Layout.setVerticalGroup(

jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alig
nment.LEADING)
.addGap(0, 0, Short.MAX_VALUE)
);
javax.swing.GroupLayout jPanel4Layout = new
javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(

jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alig
nment.LEADING)
.addGap(0, 63, Short.MAX_VALUE)
);
jPanel4Layout.setVerticalGroup(

jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alig
nment.LEADING)
.addGap(0, 812, Short.MAX_VALUE)
);

jTable1.setBackground(new java.awt.Color(204, 255,


204));
jTable1.setFont(new java.awt.Font("Tahoma", 0,
14)); // NOI18N
jTable1.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(jTable1);

javax.swing.GroupLayout layout = new


javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.L
EADING)
.addGroup(layout.createSequentialGroup()
.addGap(1122, 1122, 1122)
.addComponent(jPanel3,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.Compo
nentPlacement.RELATED)
.addComponent(jPanel4,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.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)
.addComponent(jScrollPane1)
);
layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.L
EADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel1,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.Compo
nentPlacement.RELATED)
.addComponent(jPanel2,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(15, 15, 15)
.addComponent(jScrollPane1,
javax.swing.GroupLayout.PREFERRED_SIZE, 743,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.Compo
nentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(jPanel4,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.Compo
nentPlacement.RELATED)
.addComponent(jPanel3,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(823, 823, 823))
);

pack();
}// </editor-fold>//GEN-END:initComponents
private void
jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {
}//GEN-LAST:event_jTextField1ActionPerformed
private void
jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
new StudentInformationSystem();
dispose();
}//GEN-LAST:event_jButton1ActionPerformed

private void
jTextField1KeyReleased(java.awt.event.KeyEvent evt) {
try {
String sql = "select * from information where
student_id = ? ";
pst = conn.prepareStatement(sql);
pst.setString(1, jTextField1.getText());
rs = pst.executeQuery();

jTable1.setModel(DbUtils.resultSetToTableModel(rs));

} catch (Exception e) {
JOptionPane.showMessageDialog(null, e);
} finally {

try {

rs.close();
pst.close();

} catch (Exception e) {

}
}
}
private void
jButton3ActionPerformed(java.awt.event.ActionEvent evt) }
Update_table3();
jTextField1.setText("");
}//GEN-LAST:event_jButton3ActionPerformed
private void
jButton2ActionPerformed(java.awt.event.ActionEvent evt)}
new UserIndividual().setVisible(true);
dispose();
}//GEN-LAST:event_jButton2ActionPerformed
public static void main(String args[]) {
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(UserView.class.getName()).l
og(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(UserView.class.getName()).l
og(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(UserView.class.getName()).l
og(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException
ex) {

java.util.logging.Logger.getLogger(UserView.class.getName()).l
og(java.util.logging.Level.SEVERE, null, ex);
}
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new UserView().setVisible(true);
}
});
}GEN-BEGIN:variables

7. User Manual
7.1 How to installSoftware:
Hardware Requirement-
 Intel Pentium/Celeron or similar processor based PC at Client/Server
end.
 128 MB RAM and 4GB HDD space (for Database) is desirable.
 Standard I/O devices like Keyboard and Mouse etc.
 Printer is needed for hard-copy reports.
 Local Area Network(LAN) is required for Client-Server Installation
Software Requirement-
 Windows 2000/XP OS is desirable.
 NetBeans Ver 5.1 or higher should be installed with JDK and JVM.
 MySQL Ver 6.1 with Library Database must be present at machine.
Database Installation

The software project is distributed with a backup copy of a Database named


student with required tables. Some dummy records are present in the tables
for testing purposes, which can be deleted before inserting real data. The
project is shipped with LIB.SQL file which installs a database and tables in
the computer system.

Note: The PC must have MySQL server with user (root) and password
(admin) . If root password is any other password, it can be changed by
running MySQL Server Instance Configure Wizard.

Start Program  MySQL MySQL Server MySQL Server Instance


Config Wizard

Provide current password of root and new password as “admin” , this will
change the root password.

8.References
In order to work on this project titled -LibSys – Public Library Management
System, the following books and literature are refered by me during the
various phases of development of the project.

(1) The Complete Reference Java 2.0


-by Shildit
(2) MySQL, Black Book
-by Steven Holzner
(2) Understanding SQL
– Gruber
(3) http://www.mysql.org/

(4) http://www.netbeans.org/

(5) On-line Help of NetBeans ®


(6) http://www.rediker.com/student_management_system

(7) http://www.slideshare.net/GS274/student-management-system

You might also like