SlideShare a Scribd company logo
1 of 34
Kendriya Vidyalaya Durg
A Project Report
on
Vidyarthy
Darpan
For
Class 12 Examination
[As a part of the Informatics Practices Course
(065)]
SUBMITTED BY:-
Gaurav Kumar
[Roll No. 6647663]
Under the Guidance of :-
Pratibha Bhele
PGT (Comp.Sc)
CERTIFICATE
This is to certify that the Project / Dissertation
entitled Vidyarthy Darpan is a bonafide work
done by Master Gaurav Kumar of class XII
Session 2016-17 in partial fulfillment of CBSE
Examination 2017 and has been carried out under
my direct supervision and guidance. This report or
a similar report on the topic has not been
submitted for any other examination and does not
form a part of any other course undergone by the
candidate.
…………………………
……………………………..
Signature of Student Signature of
Teacher/Guide
Name.: Gaurav Kumar Name.: Pratibha Bhele
Roll No.: 6647663 Designation.: PGT (Comp.Sc.)
……….…………………
Signature of Principal
Name: Gloria Minj
ACKNOWLEDGEMENT
undertook this Project work, as the part of my XII-
Informatics 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
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
C o n t e n t s
………………………… ……………………………..--------------------------------------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
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.
T
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 st
(
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
2. time
To Display the Current Date
To Display the Current Time
2. jButton 1. Login
2. Exit
3. create
To Login(Enter) into the Program
To Exit the Program
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
2. time
To Display the Current Date
To Display the Current Time
2. jButton 1. create
2. logout
To Create the new User-ID
To Logout from the Program
3. jTextField 1. username User can Enter their username
4. jPasswordField 1. pass
2. C_pass
User can Enter their Secrete
Password
To Confirm user’s, Secrete Password
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
2. time
To Display the Current Date
To Display the Current Time
2. jButton 1. Logout
2. Student_manager
3. show_Records
4. Login_info
To Logout from the Program
To jump on Student-detail Page
To jump on Show all Records Page
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
2. time
To Display the Current Date
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:UsersGaurav_2DocumentsNetBeansProjectsStudentbuildclassesProject
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
2. time
To Display the Current Date
To Display the Current Time
2. jButton 1. BACK
2. addrecord
3. update
4. clear
5. deleteRecord
To Back on Student-Manager Page
To add a new student record
To update a record that already Exist
To clear Enter Data Currently
To delete currently open record
6. jCheckBox 1. updateRecord
2. changeID
To enable option to update the record
7. jComboBox 1. sex
2. section_CB
User can select their gender
User can select their School Section
3. jTextField 1. path
2. search_TF
3. studentID_TF
4. fname_TF
5. lname_TF
6. dob_TF
7. class_TF
8. aadhar_TF
9. email_TF
10. percontact_TF
To set photo Path
To search stdent record
User can enter their student ID
User can enter their First Name
User can enter their Last Name
User can enter their Date of Birth
User can enter their class
User can enter their Aadhar no
User can enter their email address
User can enter their personal no
11. patcontact_TF
12. curaddress_TF
13. hometaddress_TF
14. post_TF
User can enter their parents contact no
User can enter their current address
User can enter their home address
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 filesMysqlMySql server 5.1Bin 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 filesMysqlMySql server 5.1Bin>
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.

More Related Content

What's hot

Library Management Project (computer science) class 12
Library Management Project (computer science) class 12Library Management Project (computer science) class 12
Library Management Project (computer science) class 12RithuJ
 
computer science with python project for class 12 cbse
computer science with python project for class 12 cbsecomputer science with python project for class 12 cbse
computer science with python project for class 12 cbsemanishjain598
 
Computer science project work
Computer science project workComputer science project work
Computer science project workrahulchamp2345
 
Computer Project for class 12 CBSE on school management
Computer Project for class 12 CBSE on school managementComputer Project for class 12 CBSE on school management
Computer Project for class 12 CBSE on school managementRemaDeosiSundi
 
Banking Management System Project documentation
Banking Management System Project documentationBanking Management System Project documentation
Banking Management System Project documentationChaudhry Sajid
 
Project front page, index, certificate, and acknowledgement
Project front page, index, certificate, and acknowledgementProject front page, index, certificate, and acknowledgement
Project front page, index, certificate, and acknowledgementAnupam Narang
 
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...AnkitSharma1903
 
Computer Science Investigatory Project
Computer Science Investigatory ProjectComputer Science Investigatory Project
Computer Science Investigatory ProjectPrakhar Seth
 
SYNOPSIS ON BANK MANAGEMENT SYSTEM
SYNOPSIS ON BANK MANAGEMENT SYSTEMSYNOPSIS ON BANK MANAGEMENT SYSTEM
SYNOPSIS ON BANK MANAGEMENT SYSTEMNitish Xavier Tirkey
 
Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)KushShah65
 
Library Management System
Library Management SystemLibrary Management System
Library Management SystemAditya Shah
 
TOPIC-To investigate the relation between the ratio of :- 1. Input and outpu...
TOPIC-To investigate the relation between the ratio of :-1. Input and outpu...TOPIC-To investigate the relation between the ratio of :-1. Input and outpu...
TOPIC-To investigate the relation between the ratio of :- 1. Input and outpu...CHMURLIDHAR
 
Clothing Store and Management System
Clothing Store and Management SystemClothing Store and Management System
Clothing Store and Management SystemAshwini0951
 
Student DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEmStudent DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEmhome
 
Student Management System best PPT
Student Management System best PPTStudent Management System best PPT
Student Management System best PPTDheeraj Kumar tiwari
 
cbse 12th chemistry investigatory project
cbse 12th chemistry investigatory project cbse 12th chemistry investigatory project
cbse 12th chemistry investigatory project NIKHIL DWIVEDI
 
Term 2 CS Practical File 2021-22.pdf
Term 2 CS Practical File 2021-22.pdfTerm 2 CS Practical File 2021-22.pdf
Term 2 CS Practical File 2021-22.pdfKiranKumari204016
 
College Management System project
College Management System projectCollege Management System project
College Management System projectManish Kushwaha
 

What's hot (20)

Library Management Project (computer science) class 12
Library Management Project (computer science) class 12Library Management Project (computer science) class 12
Library Management Project (computer science) class 12
 
computer science with python project for class 12 cbse
computer science with python project for class 12 cbsecomputer science with python project for class 12 cbse
computer science with python project for class 12 cbse
 
Computer science project work
Computer science project workComputer science project work
Computer science project work
 
Computer Project for class 12 CBSE on school management
Computer Project for class 12 CBSE on school managementComputer Project for class 12 CBSE on school management
Computer Project for class 12 CBSE on school management
 
Banking Management System Project documentation
Banking Management System Project documentationBanking Management System Project documentation
Banking Management System Project documentation
 
Project front page, index, certificate, and acknowledgement
Project front page, index, certificate, and acknowledgementProject front page, index, certificate, and acknowledgement
Project front page, index, certificate, and acknowledgement
 
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...
 
Computer Science Investigatory Project
Computer Science Investigatory ProjectComputer Science Investigatory Project
Computer Science Investigatory Project
 
SYNOPSIS ON BANK MANAGEMENT SYSTEM
SYNOPSIS ON BANK MANAGEMENT SYSTEMSYNOPSIS ON BANK MANAGEMENT SYSTEM
SYNOPSIS ON BANK MANAGEMENT SYSTEM
 
Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)
 
Poverty project
Poverty projectPoverty project
Poverty project
 
Library Management System
Library Management SystemLibrary Management System
Library Management System
 
TOPIC-To investigate the relation between the ratio of :- 1. Input and outpu...
TOPIC-To investigate the relation between the ratio of :-1. Input and outpu...TOPIC-To investigate the relation between the ratio of :-1. Input and outpu...
TOPIC-To investigate the relation between the ratio of :- 1. Input and outpu...
 
Clothing Store and Management System
Clothing Store and Management SystemClothing Store and Management System
Clothing Store and Management System
 
Student DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEmStudent DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEm
 
Student Management System best PPT
Student Management System best PPTStudent Management System best PPT
Student Management System best PPT
 
cbse 12th chemistry investigatory project
cbse 12th chemistry investigatory project cbse 12th chemistry investigatory project
cbse 12th chemistry investigatory project
 
Project report
Project reportProject report
Project report
 
Term 2 CS Practical File 2021-22.pdf
Term 2 CS Practical File 2021-22.pdfTerm 2 CS Practical File 2021-22.pdf
Term 2 CS Practical File 2021-22.pdf
 
College Management System project
College Management System projectCollege Management System project
College Management System project
 

Similar to class 12 board project on database connectivity (java to SQL)

Java Project "JPS-School Management System" CBSE AISSCE Pratical Examination...
 Java Project "JPS-School Management System" CBSE AISSCE Pratical Examination... Java Project "JPS-School Management System" CBSE AISSCE Pratical Examination...
Java Project "JPS-School Management System" CBSE AISSCE Pratical Examination...Sarthak Khabiya
 
INDUSTRIAL TRAINING SAMPLE.pdf
INDUSTRIAL TRAINING SAMPLE.pdfINDUSTRIAL TRAINING SAMPLE.pdf
INDUSTRIAL TRAINING SAMPLE.pdfDevaPrakash20
 
E learning project report (Yashraj Nigam)
E learning project report (Yashraj Nigam)E learning project report (Yashraj Nigam)
E learning project report (Yashraj Nigam)Yashraj Nigam
 
Studentinformationmanagementsystem.pdf iyr
Studentinformationmanagementsystem.pdf iyrStudentinformationmanagementsystem.pdf iyr
Studentinformationmanagementsystem.pdf iyr053VENKADESHKUMARVK
 
60780174 49594067-cs1403-case-tools-lab-manual
60780174 49594067-cs1403-case-tools-lab-manual60780174 49594067-cs1403-case-tools-lab-manual
60780174 49594067-cs1403-case-tools-lab-manualChitrarasan Kathiravan
 
Password management
Password managementPassword management
Password managementSai Kumar
 
Student database management system
Student database management systemStudent database management system
Student database management systemSnehal Raut
 
Tutorial Hub presentation
Tutorial Hub  presentationTutorial Hub  presentation
Tutorial Hub presentationHarishpatil75
 
Student information management system.pdf
Student information management system.pdfStudent information management system.pdf
Student information management system.pdfKamal Acharya
 
Phase 1 Documentation (Added System Req)
Phase 1 Documentation (Added System Req)Phase 1 Documentation (Added System Req)
Phase 1 Documentation (Added System Req)Reinier Eiman
 
Vade Meccum_Book reading and publishing software NetBeans.docx
Vade Meccum_Book reading and publishing software NetBeans.docxVade Meccum_Book reading and publishing software NetBeans.docx
Vade Meccum_Book reading and publishing software NetBeans.docxGeetaShreeprabha
 
Standalone desktop application
Standalone desktop applicationStandalone desktop application
Standalone desktop applicationShreya Dandavate
 
Student result management system project using angular.pdf
Student result management system project using angular.pdfStudent result management system project using angular.pdf
Student result management system project using angular.pdfAbhilashBanki1
 

Similar to class 12 board project on database connectivity (java to SQL) (20)

Java Project "JPS-School Management System" CBSE AISSCE Pratical Examination...
 Java Project "JPS-School Management System" CBSE AISSCE Pratical Examination... Java Project "JPS-School Management System" CBSE AISSCE Pratical Examination...
Java Project "JPS-School Management System" CBSE AISSCE Pratical Examination...
 
INDUSTRIAL TRAINING SAMPLE.pdf
INDUSTRIAL TRAINING SAMPLE.pdfINDUSTRIAL TRAINING SAMPLE.pdf
INDUSTRIAL TRAINING SAMPLE.pdf
 
E learning project report (Yashraj Nigam)
E learning project report (Yashraj Nigam)E learning project report (Yashraj Nigam)
E learning project report (Yashraj Nigam)
 
Studentinformationmanagementsystem.pdf iyr
Studentinformationmanagementsystem.pdf iyrStudentinformationmanagementsystem.pdf iyr
Studentinformationmanagementsystem.pdf iyr
 
60780174 49594067-cs1403-case-tools-lab-manual
60780174 49594067-cs1403-case-tools-lab-manual60780174 49594067-cs1403-case-tools-lab-manual
60780174 49594067-cs1403-case-tools-lab-manual
 
Password management
Password managementPassword management
Password management
 
Student database management system
Student database management systemStudent database management system
Student database management system
 
Project 2
Project 2Project 2
Project 2
 
Tutorial Hub presentation
Tutorial Hub  presentationTutorial Hub  presentation
Tutorial Hub presentation
 
3 job adda doc 1
3 job adda doc 13 job adda doc 1
3 job adda doc 1
 
Student information management system.pdf
Student information management system.pdfStudent information management system.pdf
Student information management system.pdf
 
Phase 1 Documentation (Added System Req)
Phase 1 Documentation (Added System Req)Phase 1 Documentation (Added System Req)
Phase 1 Documentation (Added System Req)
 
Vade Meccum_Book reading and publishing software NetBeans.docx
Vade Meccum_Book reading and publishing software NetBeans.docxVade Meccum_Book reading and publishing software NetBeans.docx
Vade Meccum_Book reading and publishing software NetBeans.docx
 
3 job adda doc 1
3 job adda doc 13 job adda doc 1
3 job adda doc 1
 
Standalone desktop application
Standalone desktop applicationStandalone desktop application
Standalone desktop application
 
Final project se
Final project seFinal project se
Final project se
 
Nagacv
NagacvNagacv
Nagacv
 
Project report
Project report Project report
Project report
 
Student result management system project using angular.pdf
Student result management system project using angular.pdfStudent result management system project using angular.pdf
Student result management system project using angular.pdf
 
SDD-FinalYearProject
SDD-FinalYearProjectSDD-FinalYearProject
SDD-FinalYearProject
 

Recently uploaded

Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 

Recently uploaded (20)

Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 

class 12 board project on database connectivity (java to SQL)

  • 1. Kendriya Vidyalaya Durg A Project Report on Vidyarthy Darpan For Class 12 Examination [As a part of the Informatics Practices Course (065)] SUBMITTED BY:-
  • 2. Gaurav Kumar [Roll No. 6647663] Under the Guidance of :- Pratibha Bhele PGT (Comp.Sc)
  • 3. CERTIFICATE This is to certify that the Project / Dissertation entitled Vidyarthy Darpan is a bonafide work done by Master Gaurav Kumar of class XII Session 2016-17 in partial fulfillment of CBSE Examination 2017 and has been carried out under my direct supervision and guidance. This report or a similar report on the topic has not been submitted for any other examination and does not form a part of any other course undergone by the candidate. ………………………… …………………………….. Signature of Student Signature of Teacher/Guide Name.: Gaurav Kumar Name.: Pratibha Bhele Roll No.: 6647663 Designation.: PGT (Comp.Sc.)
  • 4. ……….………………… Signature of Principal Name: Gloria Minj ACKNOWLEDGEMENT undertook this Project work, as the part of my XII- Informatics 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 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.
  • 5. I also feel indebted to my Friends for the valuable suggestions during the project work. Gaurav Kumar. Class XIIth C o n t e n t s ………………………… ……………………………..--------------------------------------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
  • 6. 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.
  • 7. 2. Objective & Scope of the Project 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. T 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.
  • 8. 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.
  • 9. 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.
  • 10. 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
  • 11. 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 st ( S_ID int(11) Primary Key NOT NULL, Fname varchar(50), Lname varchar(50)
  • 12. 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) );
  • 13. 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);
  • 14. } } 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); }
  • 15. 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 2. time To Display the Current Date To Display the Current Time 2. jButton 1. Login 2. Exit 3. create To Login(Enter) into the Program To Exit the Program 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
  • 16. 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()))
  • 17. { 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 2. time To Display the Current Date To Display the Current Time 2. jButton 1. create 2. logout To Create the new User-ID To Logout from the Program 3. jTextField 1. username User can Enter their username 4. jPasswordField 1. pass 2. C_pass User can Enter their Secrete Password To Confirm user’s, Secrete Password Frame: Student_Manager.java
  • 18. 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);
  • 19. } For Student_Manager.java Control Name of Control Purpose 1. jMenuBar 1. date 2. time To Display the Current Date To Display the Current Time 2. jButton 1. Logout 2. Student_manager 3. show_Records 4. Login_info To Logout from the Program To jump on Student-detail Page To jump on Show all Records Page 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()) {
  • 20. 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
  • 22.
  • 23. 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); } }
  • 24. 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 2. time To Display the Current Date 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
  • 25. 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);
  • 26. 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")) {
  • 27. 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);
  • 28. 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
  • 29. { 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();
  • 30. 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("");
  • 31. 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:UsersGaurav_2DocumentsNetBeansProjectsStudentbuildclassesProject 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); } }
  • 32. 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 2. time To Display the Current Date To Display the Current Time 2. jButton 1. BACK 2. addrecord 3. update 4. clear 5. deleteRecord To Back on Student-Manager Page To add a new student record To update a record that already Exist To clear Enter Data Currently To delete currently open record 6. jCheckBox 1. updateRecord 2. changeID To enable option to update the record 7. jComboBox 1. sex 2. section_CB User can select their gender User can select their School Section 3. jTextField 1. path 2. search_TF 3. studentID_TF 4. fname_TF 5. lname_TF 6. dob_TF 7. class_TF 8. aadhar_TF 9. email_TF 10. percontact_TF To set photo Path To search stdent record User can enter their student ID User can enter their First Name User can enter their Last Name User can enter their Date of Birth User can enter their class User can enter their Aadhar no User can enter their email address User can enter their personal no
  • 33. 11. patcontact_TF 12. curaddress_TF 13. hometaddress_TF 14. post_TF User can enter their parents contact no User can enter their current address User can enter their home address 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
  • 34. 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 filesMysqlMySql server 5.1Bin 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 filesMysqlMySql server 5.1Bin> 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.