You are on page 1of 31

ACKNOWLEDGEMENT

I
uhttps://drive.google.com/file/d/1D5XNedsDcro2tOszKX
mgY4W9ZpxsGEwX/view?usp=drivesdkmatics Practices
course. I had tried to apply my best of knowledge and
experience, gained during the study and
class work experience. However, developing software system is
generally a quite complex and time-consuming process. It
requires a systematic study, insight vision and professional
approach during the design and development. Moreover, the
developer always feels the need, the help and good wishes of the
people near you, who have considerable experience and idea.

I would like to extend my sincere thanks and gratitude to my


teacher Pratibha Bhele. I am very much thankful to our Principal
Ms. Gloria Minj for giving valuable time and moral support to
develop this software.

I would like to take the opportunity to extend my sincere thanks


and gratitude to my father Shri Rajpal Singh, and my mother
Mrs. Krishna Devi for being a source of inspiration and
providing time and freedom to develop this software project.
I also feel indebted to my Friends for the valuable suggestions
during the project work.

Gaurav
Kumar.
Class
XIIth

Contents
………………………… ……………………………..--------------------------------------3

Signature of Student Signature of Teacher/Guide ------------------------------------ 3

Signature of Principal .............................................................................................. 4


3.1 The Hardware used ------------------------------------------------------------------------- 9

3.2 The Softwares used --------------------------------------------------- 9

4.1 Database Design ---------------------------------------------------------------------------10

Table Design ................................................................................................................ 10


4.3 jFrames Design & Event Coding --------------------------------------------------------13

5.1 How to install Software: -------------------------------------------------------------------33

Database Installation .................................................................................................. 33


1. Introduction

This software project is developed to automate the functionalities of

Students. The purpose of the software project is to develop the Management

Information System (MIS) to automate the record keeping of Students.

A MIS 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.

This software, being simple in design and working, does not require much

of training to users, and can be used as a powerful tool for Storing Student

Details.

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
T he objective of the software project is to develop a computerized MIS to automate the
functions of Student Details. This software project is also aimed to enhance the current
record keeping system, which will help managers to retrieve the up-to-date information at
right time in right shape.

The proposed software system is expected to do the following functionality-

✓ To provide a user friendly, Graphical User Interface (GUI) based integrated and
centralized environment for MIS activities.

✓ The proposed system should maintain all the records and transactions, and should generate
the required reports and information when required.

✓ 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.

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 Public Library 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.

1. This software can store records and produce reports in pre-designed format in soft copy.
There is no facility yet to produce customized reports. Only specified reports are covered.

2. There is no provision to calculate fine or penalty etc. for defaulter members; however it
can be developed easily with the help of adding modules.
3. Some application area like accounting of books and fines etc. are not implemented in the
project. It facilitates librarian to record and update only transaction record.
3. System Implementation

3.1 The Hardware used:

While developing the system, the used hardware are:

HP PC with i7 processor or sometimes, PC with (2.40 GHz) processor having 8GB RAM,

other required devices.

3.2 The Softwares used:

➢ Microsoft Windows® 8.1 as Operating System.

➢ Java NetBeans 8.0.2 as Front-end Development environment.

➢ MySQL as Back-end Sever with Database for Testing.

➢ MS-Word 2016 for documentation.


4. System Design &
Development

4.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 contraints 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 which contains the following tables.

Table Design:
The database Student contains 2 tables. The tables are normalized to minimize the redundancies
of data and enforcing the validation rules of the organization. The tables are designed to store
records. The tables and their structure are given below.

Table: St
Column Name Type Size Null Key
S_ID Integer 0011 No Primary Key
Fname Varchar 0050 Yes
Lname Varchar 0050 Yes
CLASS Integer 0002 Yes
Aadhar_no Char 0012 Yes
E_mail Varchar 0012 Yes
Per_co Char 0010 Yes
Pa_contact Char 0010 Yes
cur_address Varchar 0100 Yes
Home_address Varchar 0100 Yes
POST Char 0006 Yes
Gender Char 0006 Yes
SECTION Char 0008 Yes
DOB Date Yes
Path Varchar 2000 Yes
Table: Login_Info
Column Name Type Size Null Key
Username Varchar 500 Yes Primary Key
Date Varchar 500 Yes
Time Varchar 500 Yes
Remark varchar 007 Yes

Table: ids
Column Name Type Size Null Key
Username Varchar 200 Yes Primary key
Password Varchar 100 Yes

MySQL Commands
Create database student;

Use student;

CREATE TABLE

student(

S_ID int(11) Primary Key NOT NULL,

Fname varchar(50),

Lname varchar(50)
CLASS int(2),

Aadhar_no char(12),

E_mail varchar(100),

per_Contact char(10),

pa_Contact char(10),

cur_address varchar(100),

Home_address varchar(100),

POST char(6),

Gender char(6,

SECTION char(8),

DOB date,

path varchar(2000)

);

CREATE TABLE Login_Info

Username Varchar(500) Primary Key,

Date Varchar(500),

Time Varchar(500),

Remark Varchar(7)

);

CREATE TABLE ids

Username Varchar(200) Primary Key,

Password Varchar(100)

);
4.3 jFrames Design & Event Coding:
The software project for Student contains various forms along with programming codes. Forms
(JFrames) and their event coding are given below.

Frame: Login.java

Coding:-
private void formWindowOpened(java.awt.event.WindowEvent evt) {
get_pass.setVisible(false);
jLabel3.setVisible(false);
this.setVisible(false);
JOptionPane.showMessageDialog(null, "Welcome to Vidyarthy Darpan App...!!!");
this.setVisible(true);

try
{
String Date="Select Date(now()), time(now());";
Class.forName("java.sql.Driver");
Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost", "root", "");
Statement stmt=(Statement) con.createStatement();
ResultSet rs= stmt.executeQuery(Date);
while(rs.next())
{
String d,t;
d=rs.getString("Date(now())");
t=rs.getString("time(now())");
date.setText("Date:- "+d);
time.setText("Time:- "+t);
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR",
JOptionPane.ERROR_MESSAGE);
}
}

private void LoginActionPerformed(java.awt.event.ActionEvent evt) {


String u_name=username.getText();
String U_pass=pass.getText();
if(u_name.equals("")&&U_pass.equals(""))
{
JOptionPane.showMessageDialog(null, "Please Enter Your Username Or Password");
}
else if(u_name.equals(""))
{
JOptionPane.showMessageDialog(null, "Please Enter Your Username");
}
else if(U_pass.equals(""))
{
JOptionPane.showMessageDialog(null, "Please Enter Your Password");
}

try
{
String u,p;
u=username.getText().toUpperCase();
p=pass.getText();
String insert ="select password from ids where username = '"+u+"';";
Class.forName("java.sql.Driver");
Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", "");
Statement stmt= (Statement) con.createStatement();
ResultSet rs =stmt.executeQuery(insert);
while(rs.next())
{
String ps=rs.getString("password");
get_pass.setText(ps);
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR",
JOptionPane.ERROR_MESSAGE);
}
try
{
String remark ="Fail",Pass=pass.getText();
if(pass.getText().equals(get_pass.getText()))
remark="Pass";
jLabel3.setText(remark);
String insrt ="insert into login_info values('"+username.getText()+"',date(now()),time(now()),'"+jLabel3.getText()
+"');";
Class.forName("java.sql.Driver");
java.sql.Connection con= (java.sql.Connection) DriverManager.getConnection("jdbc:mysql://localhost/student",
"root", "");
java.sql.Statement stmt= (java.sql.Statement) con.createStatement();
stmt.executeUpdate(insrt);
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE);
}
if(pass.getText().equals(get_pass.getText()))
{
this.setVisible(false);
JOptionPane.showMessageDialog(null, "WELCOME!!!");
new Student_Manager().setVisible(true);
}
else
{
JOptionPane.showMessageDialog(null, "This Username & Password you have entered is not correct. Try
Again!!!");
}
}

private void ExitActionPerformed(java.awt.event.ActionEvent evt) {


System.exit(0);
}

private void createBTActionPerformed(java.awt.event.ActionEvent evt) {


this.setVisible(false);
new CREATE().setVisible(true);
}

For Login.java
Control Name of Control Purpose
1. jMenuBar 1. date To Display the Current Date
2. time To Display the Current Time
2. jButton 1. Login To Login(Enter) into the Program
2. Exit To Exit the Program
3. create Go to Create new User-ID Page
3. jTextField 1. username User can Enter their username
4. jPasswordField 1. pass User can Enter their Secrete
Password

Frame: CREATE.java
Coding:-
private void formWindowOpened(java.awt.event.WindowEvent evt) {
try
{
String Date="Select Date(now()), time(now());";
Class.forName("java.sql.Driver");
Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost", "root", "");
Statement stmt=(Statement) con.createStatement();
ResultSet rs= stmt.executeQuery(Date);
while(rs.next())
{
String d,t;
d=rs.getString("Date(now())");
t=rs.getString("time(now())");
date.setText("Date:- "+d);
time.setText("Time:- "+t);
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE);
}
}

private void logoutActionPerformed(java.awt.event.ActionEvent evt) {


this.setVisible(false);
new Login().setVisible(true);
}

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {


jLabel4.setVisible(false);
int msg=JOptionPane.showConfirmDialog(null,"Wanna Create The New Account???");
if(pass.getText().equals(""))
{
JOptionPane.showMessageDialog(null,"Please Enter Password");
}
else if(C_pass.getText().equals(""))
{
JOptionPane.showMessageDialog(null,"Please Enter Confirm Password");
}
else if(pass.getText().equals(C_pass.getText()))
{
if(msg==JOptionPane.YES_OPTION)
try
{
String u,p,q;
u=username.getText();
p=pass.getText();
jLabel4.setText(p);
String insrt ="insert into ids values('"+u+"','"+jLabel4.getText()+"');";
Class.forName("java.sql.Driver");
Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", "");
Statement stmt= (Statement) con.createStatement();
stmt.executeUpdate(insrt);
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"This Username is Already Exist", "ERROR",
JOptionPane.ERROR_MESSAGE);
}
}
else
{
JOptionPane.showMessageDialog(null,"Password not Match..!!", "ERROR", JOptionPane.ERROR_MESSAGE);
}
}

For CREATE.java
Control Name of Control Purpose
1. jMenuBar 1. date To Display the Current Date
2. time To Display the Current Time
2. jButton 1. create To Create the new User-ID
2. logout To Logout from the Program
3. jTextField 1. username User can Enter their username
4. jPasswordField 1. pass User can Enter their Secrete
2. C_pass Password
To Confirm user’s, Secrete Passwor d

Frame: Student_Manager.java
Coding:-
private void formWindowOpened(java.awt.event.WindowEvent evt) {
try
{
String Date="Select Date(now()), time(now());";
Class.forName("java.sql.Driver");
Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost", "root", "");
com.mysql.jdbc.Statement stmt=(com.mysql.jdbc.Statement) con.createStatement();
ResultSet rs= stmt.executeQuery(Date);
while(rs.next())
{
String d,t;
d=rs.getString("Date(now())");
t=rs.getString("time(now())");
date.setText("Date:- "+d);
time.setText("Time:- "+t);
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE);
}
}

private void logoutActionPerformed(java.awt.event.ActionEvent evt) {


this.setVisible(false);
new Login().setVisible(true);
}

private void Login_infoActionPerformed(java.awt.event.ActionEvent evt) {


this.setVisible(false);
new Login_Information().setVisible(true);
}

private void show_RecordsActionPerformed(java.awt.event.ActionEvent evt) {


this.setVisible(false);
new Show_records().setVisible(true);
}

private void Student_managerActionPerformed(java.awt.event.ActionEvent evt) {


this.setVisible(false);
new Student_detail().setVisible(true);
}

For Student_Manager.java
Control Name of Control Purpose
1. jMenuBar 1. date To Display the Current Date
2. time To Display the Current Time
2. jButton 1. Logout To Logout from the Program
2. Student_manager To jump on Student-detail Page
3. show_Records To jump on Show all Records Page
4. Login_info To jump on Login-Info Page

Frame: Login_Information.java

Coding:-
private void formWindowOpened(java.awt.event.WindowEvent evt) {
DefaultTableModel model= (DefaultTableModel) jTable1.getModel();
jTable1.setVisible(true);
try
{
String s="Select * From login_info;";
Class.forName("java.sql.Driver");
Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/student", "root", "");
Statement stmt= (Statement) con.createStatement();
ResultSet rs =stmt.executeQuery(s);
int row=model.getRowCount();
for(int i=1;i<=row;i++)
{
model.removeRow(0);
}
while(rs.next())
{
String n,d,t,r;
n=rs.getString("username");
d=rs.getString("Date");
t=rs.getString("Time");
r=rs.getString("Remark");
model.addRow(new Object[] {n,d,t,r});
}
}
catch(Exception e)
{ }
}

private void BACKActionPerformed(java.awt.event.ActionEvent evt) {


this.setVisible(false);
new Student_Manager().setVisible(true);
}

For Login_information.java
Control Name of Control Purpose
1. jButton 1. Back To Back on Student-Manager Page
2. jTable 1. show To show records related to login-Info
Frame: Show_records.java
Coding:-
private void formWindowOpened(java.awt.event.WindowEvent evt) {
try
{
String Date="Select Date(now()), time(now());";
Class.forName("java.sql.Driver");
Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost", "root", "");
com.mysql.jdbc.Statement stmt=(com.mysql.jdbc.Statement) con.createStatement();
ResultSet rs= stmt.executeQuery(Date);
while(rs.next())
{
String d,t;
d=rs.getString("Date(now())");
t=rs.getString("time(now())");
date.setText("Date:- "+d);
time.setText("Time:- "+t);
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE);
}
DefaultTableModel model= (DefaultTableModel) jTable1.getModel();
try
{
String s="Select * From st;";
Class.forName("java.sql.Driver");
Connection conn= (Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", "");
Statement stmt= (Statement) conn.createStatement();
ResultSet rs =stmt.executeQuery(s);
while(rs.next())
{
String
SID,FNAME,LNAME,DOB,SEX,CLASS,SECTION,AADHAR,MAIL,CONTACT,PCONTACT,CADDRESS,HAD
DRESS,POST;
SID=rs.getString("S_ID");
FNAME=rs.getString("Fname");
LNAME=rs.getString("Lname");
CLASS=rs.getString("CLASS");
AADHAR=rs.getString("Aadhar_no");
MAIL=rs.getString("E_mail");
CONTACT=rs.getString("per_Contact");
PCONTACT=rs.getString("pa_Contact");
CADDRESS=rs.getString("cur_address");
HADDRESS=rs.getString("Home_address");
POST=rs.getString("POST");
SEX=rs.getString("gender");
SECTION=rs.getString("SECTION");
DOB=rs.getString("DOB");
model.addRow(new Object[]
{SID,FNAME,LNAME,DOB,SEX,CLASS,SECTION,AADHAR,MAIL,CONTACT,PCONTACT,CADDRESS,HA
DDRESS,POST});
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE);
}
}
private void search_TFKeyReleased(java.awt.event.KeyEvent evt) {
DefaultTableModel model= (DefaultTableModel) jTable1.getModel();
try
{
String ID=search_TF.getText();
String s="Select * From st where S_ID='"+ID+"';";
Class.forName("java.sql.Driver");
Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", "");
Statement stmt= (Statement) con.createStatement();
ResultSet rs =stmt.executeQuery(s);
int r=model.getRowCount();
for(int i=1;i<=r;i++)
{
model.removeRow(0);
}
while(rs.next())
{
String
SID,FNAME,LNAME,DOB,SEX,CLASS,SECTION,AADHAR,MAIL,CONTACT,PCONTACT,CADDRESS,HAD
DRESS,POST;
SID=rs.getString("S_ID");
FNAME=rs.getString("Fname");
LNAME=rs.getString("Lname");
CLASS=rs.getString("CLASS");
AADHAR=rs.getString("Aadhar_no");
MAIL=rs.getString("E_mail");
CONTACT=rs.getString("per_Contact");
PCONTACT=rs.getString("pa_Contact");
CADDRESS=rs.getString("cur_address");
HADDRESS=rs.getString("Home_address");
POST=rs.getString("POST");
SEX=rs.getString("gender");
SECTION=rs.getString("SECTION");
DOB=rs.getString("DOB");

model.addRow(new Object[]
{SID,FNAME,LNAME,DOB,SEX,CLASS,SECTION,AADHAR,MAIL,CONTACT,PCONTACT,CADDRESS,HA
DDRESS,POST});
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE);
}
}

private void BACKActionPerformed(java.awt.event.ActionEvent evt) {


this.setVisible(false);
new Student_Manager().setVisible(true);
}

For Show_records.java
Control Name of Control Purpose
1. jMenuBar 1. date To Display the Current Date
2. time To Display the Current Time
2. jButton 1. Back To Back on Student-Manager Page
3. jTable 2. show To show all details related to
Students

Frame: Student_detail.java

Coding:-
private void formWindowOpened(java.awt.event.WindowEvent evt) {
update.setEnabled(false);
path.setVisible(false);
changeID.setEnabled(false);
updateRecord.setEnabled(false);
section.setEnabled(false);
section_CB.setEnabled(false);
try
{
String Date="Select Date(now()), time(now());";
Class.forName("java.sql.Driver");
Connection con= (Connection)DriverManager.getConnection("jdbc:mysql://localhost", "root", "");
com.mysql.jdbc.Statement stmt=(com.mysql.jdbc.Statement) con.createStatement();
ResultSet rs= stmt.executeQuery(Date);
while(rs.next())
{
String d,t;
d=rs.getString("Date(now())");
t=rs.getString("time(now())");
date.setText("Date:- "+d);
time.setText("Time:- "+t);
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE);
}
}

private void BACKActionPerformed(java.awt.event.ActionEvent evt) {


this.setVisible(false);
new Student_Manager().setVisible(true);
}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {


try
{
String ID=search_TF.getText();
String s="Select * From st where S_ID='"+ID+"';";
Class.forName("java.sql.Driver");
com.mysql.jdbc.Connection con= (com.mysql.jdbc.Connection)
DriverManager.getConnection("jdbc:mysql://localhost/student", "root", "");
Statement stmt= (Statement) con.createStatement();
ResultSet rs =stmt.executeQuery(s);
while(rs.next())
{
String
SID,FNAME,LNAME,DOB,SEX,CLASS,SECTION,AADHAR,MAIL,CONTACT,PCONTACT,CADDR
ESS,HADDRESS,POST,PATH;
SID=rs.getString("S_ID");
FNAME=rs.getString("Fname");
LNAME=rs.getString("Lname");
CLASS=rs.getString("CLASS");
AADHAR=rs.getString("Aadhar_no");
MAIL=rs.getString("E_mail");
CONTACT=rs.getString("per_Contact");
PCONTACT=rs.getString("pa_Contact");
CADDRESS=rs.getString("cur_address");
HADDRESS=rs.getString("Home_address");
POST=rs.getString("POST");
SEX=rs.getString("gender");
SECTION=rs.getString("SECTION");
DOB=rs.getString("DOB");
PATH=rs.getString("path");
if(SEX.equals("Male"))
{
sex.setSelectedIndex(0);
}
if(SEX.equals("Female"))
{
sex.setSelectedIndex(1);
}
if(SEX.equals("Other"))
{
sex.setSelectedIndex(2);
}
if(SECTION.equals("null"))
{
section_CB.setSelectedIndex(-1);
}
if(SECTION.equals("MATH"))
{
section_CB.setSelectedIndex(0);
}
if(SECTION.equals("BIOLOGY"))
{
section_CB.setSelectedIndex(1);
}
if(SECTION.equals("COMMERCE"))
{
section_CB.setSelectedIndex(2);
}
if(SECTION.equals("ART"))
{
section_CB.setSelectedIndex(3);
}
studentID_TF.setText(""+SID);
fname_TF.setText(""+FNAME);
lname_TF.setText(""+LNAME);
dob_TF.setText(""+DOB);
class_TF.setText(""+CLASS);
aadhar_TF.setText(""+AADHAR);
email_TF.setText(""+MAIL);
percontact_TF.setText(""+CONTACT);
patcontact_TF.setText(""+PCONTACT);
curaddress_TF.setText(""+CADDRESS);
hometaddress_TF.setText(""+HADDRESS);
post_TF.setText(""+POST);
int w=photo.getWidth();
int h=photo.getHeight();
ImageIcon imageIcon = new ImageIcon(new ImageIcon(PATH).getImage().getScaledInstance(w, h,
Image.SCALE_DEFAULT));
photo.setIcon(imageIcon);
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR",
JOptionPane.ERROR_MESSAGE);
}
studentID_TF.setEditable(false);
fname_TF.setEditable(false);
lname_TF.setEditable(false);
dob_TF.setEditable(false);
sex.setEnabled(false);
class_TF.setEditable(false);
section_CB.setEnabled(false);
aadhar_TF.setEditable(false);
email_TF.setEditable(false);
percontact_TF.setEditable(false);
patcontact_TF.setEditable(false);
curaddress_TF.setEditable(false);
hometaddress_TF.setEditable(false);
post_TF.setEditable(false);
changeID.setSelected(false);
updateRecord.setSelected(false);
updateRecord.setEnabled(true);
}

private void updateRecordItemStateChanged(java.awt.event.ItemEvent evt) {


if(updateRecord.isSelected())
{
changeID.setEnabled(true);
studentID_TF.setEditable(false);
fname_TF.setEditable(true);
lname_TF.setEditable(true);
dob_TF.setEditable(true);
sex.setEnabled(true);
class_TF.setEditable(true);
section_CB.setEnabled(true);
aadhar_TF.setEditable(true);
email_TF.setEditable(true);
percontact_TF.setEditable(true);
patcontact_TF.setEditable(true);
curaddress_TF.setEditable(true);
hometaddress_TF.setEditable(true);
post_TF.setEditable(true);
changeID.setEnabled(true);
}
else
{
studentID_TF.setEditable(false);
fname_TF.setEditable(false);
lname_TF.setEditable(false);
dob_TF.setEditable(false);
sex.setEnabled(false);
class_TF.setEditable(false);
section_CB.setEnabled(false);
aadhar_TF.setEditable(false);
email_TF.setEditable(false);
percontact_TF.setEditable(false);
patcontact_TF.setEditable(false);
curaddress_TF.setEditable(false);
hometaddress_TF.setEditable(false);
post_TF.setEditable(false);
changeID.setEnabled(false);
}
}

private void changeIDItemStateChanged(java.awt.event.ItemEvent evt) {


if(changeID.isSelected())
{
studentID_TF.setEditable(true);
update.setEnabled(false);
}
else
{
studentID_TF.setEditable(false);
update.setEnabled(true);
}
}

private void photoMouseClicked(java.awt.event.MouseEvent evt) {


path.setText("");
JFileChooser chooser = new JFileChooser();
chooser.setDialogTitle("Select Image");
chooser.showOpenDialog(null);
File f=chooser.getSelectedFile();
String PATH=f.getAbsolutePath();
path.setText(PATH.replace('\\', '/' ));
int w=photo.getWidth();
int h=photo.getHeight();
ImageIcon imageIcon = new ImageIcon(new ImageIcon(PATH).getImage().getScaledInstance(w, h,
Image.SCALE_DEFAULT));
photo.setIcon(imageIcon);
}

private void class_TFKeyReleased(java.awt.event.KeyEvent evt) {


int Cl=Integer.parseInt(class_TF.getText());
if(Cl>12)
{
JOptionPane.showMessageDialog(null,"Enter Valid Class !!!");
class_TF.setText("");
}
else if(Cl>=11)
{
section.setEnabled(true);
section_CB.setEnabled(true);
}
else if(Cl<11)
{
section.setEnabled(false);
section_CB.setEnabled(false);
}
}

private void addrecordActionPerformed(java.awt.event.ActionEvent evt) {


int msg=JOptionPane.showConfirmDialog(null,"Wanna Save the record for sure???");
if(msg==JOptionPane.YES_OPTION)
try
{
String SID=studentID_TF.getText();
String Fname=fname_TF.getText();
String Lname=lname_TF.getText();
String CLASS=class_TF.getText();
String AADHAR_NO=aadhar_TF.getText();
String E_mail=email_TF.getText();
String P_Contact=percontact_TF.getText();
String Pa_Contact=patcontact_TF.getText();
String CUR_address=curaddress_TF.getText();
String Home_address=hometaddress_TF.getText();
String POST=post_TF.getText();
String Sex,SECTION;
Sex=(String) sex.getSelectedItem();
SECTION=(String) section_CB.getSelectedItem();
String DOB=dob_TF.getText();
String PATH=path.getText();
String insrt ="insert into st
values('"+SID+"','"+Fname+"','"+Lname+"','"+CLASS+"','"+AADHAR_NO+"','"+E_mail+"','"+P_Contact+"','"+Pa_
Contact+"','"+CUR_address+"','"+Home_address+"','"+POST+"','"+Sex+"','"+SECTION+"','"+DOB+"',
'"+PATH+"');";
Class.forName("java.sql.Driver");
Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", "");
Statement stmt= (Statement) con.createStatement();
stmt.executeUpdate(insrt);
}
catch (Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE);
}
}

private void updateActionPerformed(java.awt.event.ActionEvent evt) {


int msg=JOptionPane.showConfirmDialog(null,"Wanna Update the record for sure???");
if(msg==JOptionPane.YES_OPTION)
try
{
String SID=studentID_TF.getText();
String Fname=fname_TF.getText();
String Lname=lname_TF.getText();
String CLASS=class_TF.getText();
String AADHAR_NO=aadhar_TF.getText();
String E_mail=email_TF.getText();
String P_Contact=percontact_TF.getText();
String Pa_Contact=patcontact_TF.getText();
String CUR_address=curaddress_TF.getText();
String Home_address=hometaddress_TF.getText();
String POST=post_TF.getText();
String Sex,SECTION;
Sex=(String) sex.getSelectedItem();
SECTION=(String) section_CB.getSelectedItem();
String DOB=dob_TF.getText();
String PATH=path.getText().replace('\\', '/');

String insrt ="update st set Fname='"+Fname+"', Lname='"+Lname+"', CLASS='"+CLASS+"',


Aadhar_no='"+AADHAR_NO+"', E_mail='"+E_mail+"', per_Contact='"+P_Contact+"',
pa_Contact='"+Pa_Contact+"',cur_address='"+CUR_address+"', Home_address='"+Home_address+"',
POST='"+POST+"', gender='"+Sex+"', SECTION='"+SECTION+"', DOB='"+DOB+"', path='"+PATH+"' where
S_ID='"+SID+"';";
Class.forName("java.sql.Driver");
Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", "");
Statement stmt= (Statement) con.createStatement();
stmt.executeUpdate(insrt);
}
catch (Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE);
}
}

private void clearActionPerformed(java.awt.event.ActionEvent evt) {


path.setText("");
section.setEnabled(false);
section_CB.setEnabled(false);
studentID_TF.setText("");
fname_TF.setText("");
lname_TF.setText("");
dob_TF.setText("");
class_TF.setText("");
aadhar_TF.setText("");
email_TF.setText("");
percontact_TF.setText("");
patcontact_TF.setText("");
curaddress_TF.setText("");
hometaddress_TF.setText("");
post_TF.setText("");
search_TF.setText("");
sex.setSelectedIndex(0);
section_CB.setSelectedIndex(-1);
changeID.setSelected(false);
changeID.setEnabled(false);
updateRecord.setSelected(false);
updateRecord.setEnabled(false);
photo.setIcon(newImageIcon("C:\\Users\\Gaurav_2\\Documents\\NetBeansProjects\\Student\\build\\classes\\Project\\
profile-icon.png"));
}

private void deleteRecordActionPerformed(java.awt.event.ActionEvent evt) {


int msg=JOptionPane.showConfirmDialog(null,"Wanna Delete the record for sure???");
if(msg==JOptionPane.YES_OPTION)
try
{
String SID=studentID_TF.getText();
String insrt ="delete from st where S_ID='"+SID+"';";
Class.forName("java.sql.Driver");
Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", "");
Statement stmt= (Statement) con.createStatement();
stmt.executeUpdate(insrt);

section.setEnabled(false);
section_CB.setEnabled(false);
studentID_TF.setText("");
fname_TF.setText("");
lname_TF.setText("");
dob_TF.setText("");
class_TF.setText("");
aadhar_TF.setText("");
email_TF.setText("");
percontact_TF.setText("");
patcontact_TF.setText("");
curaddress_TF.setText("");
hometaddress_TF.setText("");
post_TF.setText("");
search_TF.setText("");
sex.setSelectedIndex(0);
section_CB.setSelectedIndex(-1);
changeID.setSelected(false);
updateRecord.setSelected(false);
changeID.setEnabled(false);
updateRecord.setEnabled(false);
}
catch (Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE);
}
}
private void exitPActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);
}

private void showalldataActionPerformed(java.awt.event.ActionEvent evt) {


this.setVisible(false);
new Show_records().setVisible(true);
}

For Student_detail.java

Control Name of Control Purpose


1. jMenuBar 1. date To Display the Current Date
2. time To Display the Current Time
2. jButton 1. BACK To Back on Student-Manager Page
2. addrecord To add a new student record
3. update To update a record that already Exist
4. clear To clear Enter Data Currently
5. deleteRecord To delete currently open record
6. jCheckBox 1. updateRecord To enable option to update the record
2. changeID
7. jComboBox 1. sex User can select their gender
2. section_CB User can select their School Section
3. jTextField 1. path To set photo Path
2. search_TF To search stdent record
3. studentID_TF User can enter their student ID
4. fname_TF User can enter their First Name
5. lname_TF User can enter their Last Name
6. dob_TF User can enter their Date of Birth
7. class_TF User can enter their class
8. aadhar_TF User can enter their Aadhar no
9. email_TF User can enter their email address
10. percontact_TF User can enter their personal no
11. patcontact_TF User can enter their parents contact no
12. curaddress_TF User can enter their current address
13. hometaddress_TF User can enter their home address
14. post_TF User can enter their Post code

5. User Manual

5.1 How to install Software:.

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 Student.SQL file which installs a
database and tables in the computer system.

Note:- The PC must have MySQL server with user (root) and password ( ) . 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 “” , this will change the root password.

To install a MySQL database from a dump file ( Student.sql), simply follow the following steps.

Step 1: Copy the Student.sql file in C:\Program files\Mysql\MySql server 5.1\Bin folder.

Step 2: Open MySQL and type the following command to create the dabase named Student.

mysql> create database Student;

Step 3: Open Command Window (Start Run  cmd)

Step 4: Go to the following folder using CD command

C:\Program files\Mysql\MySql server 5.1\Bin>

Step 5: type the following command on above prompt -

C:….\bin> mysql -u root -p Student < Student.sql

This will create a Student database with required tables.

You might also like