Professional Documents
Culture Documents
Project Report On
Chavan Rutuja
Gaikwad Rutuja
Gore Pallavi
Shitole Priti
Ghode Navnath
P
Guided by
AP
Mrs. S. B. Chavan
n
tio
lu
So
TE
SB
M
1
CERTIFICATE
This is to certify that the project entitled “ Student Management System” has been
carried out By
Chavan Rutuja [11]
P
Gaikwad Rutuja [16]
AP
Gore Pallavi [20]
n
Shitole Priti [50]
tio
Ghode Navnath [54]
lu
So
TE
other diploma.
M
P
2 Aim of the micro project 2
AP
3 Course Outcomes (COs) 3
n
tio
4 Literature Review 4
lu
So
8 Skill developed 53
The project is about the “Student Management System”. We all use a concept of
object oriented programming . So we make a project on STUDENT MANAGEMENT
SYSTEM using Java language in JDK.In this project we use swing to design the system and
database connectivity to manage the student system. This idea we uses in any school/colloge
to manage system.This micro project is very helpful for us.
In the modern world of information technology, the JAVA programing has become the
most preferred approach for software development. It offers a powerful way to cope up with
P
complexity of real world problems. Among the OOP languages available ,Java is the primitive
AP
language which develops fundamental understanding of object oriented concepts. This course
enables students to develop programs in ‘Java’ using swing approach. So we make project on
Student Management System. n
As a computer engineer we know the basic information of java swing. The topic of
tio
project is about STUDENT MANAGEMENT SYSTEM. Due to this project our knowledge
was improve. So this micro project was very helpful for us.
lu
So
TE
SB
M
2. Aim of the Micro- Project
P
AP
n
tio
lu
So
TE
SB
M
3. Course Outcome Addressed
P
AP
n
tio
lu
So
TE
SB
M
4. Literature Review:-
The system comes with functionalities for educational institutions to maintain the data of students. It
helps both the student guardian and the institution or any college/school for maintaining their all the data of
students who are learning in that specific place. In this system every student have their unique ID. i.e.
Student ID. One more feature Student Data Management System is an application software and which has
intention to begin a conductive and direct interchanging the statistics in a secure platform to coalesce with
students, faculties, parents and the college/school administration. The student information has the particulars
(like Student ID, First name, Surname, Date of birth, Gender, Email, Contact Number, Address Line 1,
Address Line 2, Apt/House No, Post Code, and Course Code, etc.) invade to the system by faculties. All
these particulars is stored in the Database. As student added to the system it is difficult to manage and track
the details manually. To overcome this difficulties we come up with this approach Student Data
Management System.
Student Information is a part of system to keep track of the particular student. It is mandatory process in
educational system which directly reflects the student information.
The paper provides end user to seamless navigation to the application and ease to access. The system
provides information management storing of student reports. This system consist of various functionalities
P
like adding the new records, updating the existing records, We can able to make all the fields empty by
clicking on Clear button. And using Delete button can able to delete the any existing record. This system is
AP
developed for any institution or college/school to provide end users to maintain their data with minimum
efforts. Initially faculties/students get registered with the system once they finish registration process they
can access the system as well as they are able to do the changes in the data. It is easy to use. It is developed
n
to suite the current environment which is rapidly growing in the student domain.
tio
lu
So
TE
SB
M
5. Actual Methodology Followed
P
Window Panel
AP
/
Frame
n
tio
II. AWT Controls :-
The controls are different components which allow a user to internet with our application in
lu
various ways.
So
Examples:-Label, Pash Buttons, CheckBoxes, Choice List, ScrollBar, List, Text editing etc.
TE
III. Swings :-
SB
Java swing is a GUI Framework that contains a set of classes to provide more powerful and
flexible GUI components than AWT.
Swing provides the look and feel of modern java GUI.
M
V. Database Connectivity :-
Introduction to JDBC:-
i. JDBC stands for Java Database Connectivity.
ii. It is a set of Java APIs used for executing SQL statements.
iii. This API consists of a set of classes and interfaces to enable
iv. programmers to write pure Java Database applications.
v. JDBC API(JDBC Application Programming Interface) defines
vi. how an application opens a connection ,communicates with a
P
vii. database,executes SQL statements ,and retrieves query results.
viii. The JDBC API includes two packages:java.sql and javax.sql.
AP
Steps for querying the database with jdbc
Step1 . Getting Connected n
tio
register the driver
-using the Driver and Driver Manager objects.
lu
Creates a statement
-creates Statement, PreparedStatement or CallableStatement objects.
SB
P
AP
5. Coding Design 18/08/2019 25/08/2019 Rutuja Chavan
Database:-
SB
package student.information.system;
import java.sql.*;
M
import javax.swing.*;
public class db {
Connection conn=null;
public static Connection java_db(){
try{
Class.forName("org.sqlite.JDBC");
Connection conn =DriverManager.getConnection("jdbc:sqlite:C:\\Users\\crutuja69\\Desktop\\Student
Information System\\studentInfo.sqlite");
return conn;
}
}
Login:-
package student.information.system;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.GregorianCalendar;
import javax.swing.JOptionPane;
import com.sun.glass.events.KeyEvent;
import java.awt.*;
P
import java.sql.Connection;
AP
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import javax.swing.*;
n
tio
import java.util.Calendar;
import java.util.Date;
lu
import java.util.GregorianCalendar;
So
ResultSet rs=null;
PreparedStatement pst=null;
SB
public Login() {
initComponents();
conn=db.java_db();
M
txt_date.setText((month+1)+"/"+day+"/"+year);
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setResizable(false);
P
AP
jPanel1.setLayout(null);
jLabel2.setText("Username :");
jPanel1.add(jLabel2);
jLabel2.setBounds(20, 280, 70, 14);
n
tio
jLabel3.setText("Password :");
lu
jPanel1.add(jLabel3);
So
jButton1.setText("Login");
TE
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
SB
}
});
jPanel1.add(jButton1);
M
jLabel4.setText("Division :");
jPanel1.add(jLabel4);
jLabel4.setBounds(20, 360, 50, 14);
jLabel1.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/bk4.jpg"))); // NOI18N
jPanel1.add(jLabel1);
jLabel1.setBounds(0, 0, 660, 430);
txt_date.setText("Date");
jMenuBar1.add(txt_date);
txt_time.setText("Time");
jMenuBar1.add(txt_time);
setJMenuBar(jMenuBar1);
P
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
AP
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 433, Short.MAX_VALUE)
);
pack();
}// </editor-fold>
n
tio
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
lu
String sql = "select id,username,password,division from Users Where (username =? and password =?
and division =?)";
TE
try{
int count =0;
SB
pst=conn.prepareStatement(sql);
M
pst.setString(1,txt_username.getText());
pst.setString(2,txt_password.getText());
pst.setString(3, txt_combo.getSelectedItem().toString());
rs=pst.executeQuery();
{
}
while(rs.next()){
int id = rs.getInt(1);
Emp.empId = id;
count =count+1;
}
String access=(txt_combo.getSelectedItem().toString());
if(access=="Admin") {
if(count==1){
JOptionPane.showMessageDialog(null,"Sucess" );
MainMenu j = new MainMenu();
j.setVisible(true);
this.dispose();
P
AP
String value0 = timeString;
String values = dateString;
pst=conn.prepareStatement(reg);
So
pst.execute();
this.dispose();
TE
}
SB
else if(count>1){
M
} catch(Exception e)
{
JOptionPane.showMessageDialog(null, e);
}
finally {
try{
rs.close();
pst.close();
}
catch(Exception e){
P
javax.swing.UIManager.setLookAndFeel(info.getClassName());
AP
break;
}
}
} catch (ClassNotFoundException ex) { n
java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE,
tio
null, ex);
} catch (InstantiationException ex) {
lu
java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE,
So
null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE,
TE
null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE,
SB
null, ex);
}
//</editor-fold>
M
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Login().setVisible(true);
}
});
}
import java.awt.Dimension;
import java.awt.Toolkit;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
P
import java.util.Date;
AP
import java.util.GregorianCalendar;
import javax.swing.JOptionPane;
/**
So
conn=db.java_db();
initComponents();
Toolkit toolkit = getToolkit();
SB
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setResizable(false);
jPanel1.setLayout(null);
jButton1.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/Add.png"))); //
NOI18N
jButton1.setText("Student Manager");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jPanel1.add(jButton1);
jButton1.setBounds(570, 430, 190, 60);
jButton5.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/logout.png"))); //
P
NOI18N
AP
jButton5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton5ActionPerformed(evt);
});
} n
tio
jPanel1.add(jButton5);
jButton5.setBounds(750, 10, 40, 30);
lu
So
jLabel1.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/bk3.jpg"))); // NOI18N
jPanel1.add(jLabel1);
TE
jMenu1.setText("File");
SB
jMenuItem1.setText("Audit");
jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
M
jMenuItem2.setText("Users");
jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem2ActionPerformed(evt);
}
});
jMenu1.add(jMenuItem2);
jMenuBar1.add(jMenu1);
setJMenuBar(jMenuBar1);
pack();
}// </editor-fold>
P
Login j = new Login();
AP
j.setVisible(true);
this.dispose();
try{
n
tio
Date currentDate = GregorianCalendar.getInstance().getTime();
DateFormat df = DateFormat.getDateInstance();
lu
JOptionPane.showMessageDialog(null, e);
}
finally {
try{
rs.close();
pst.close();
}
catch(Exception e){
}
}
P
private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {
AP
// TODO add your handling code here:
Audit_details j = new Audit_details();
j.setVisible(true);
} n
tio
private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
lu
So
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
M
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(MainMenu.class.getName()).log(java.util.logging.Level.SEVERE, null,
ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(MainMenu.class.getName()).log(java.util.logging.Level.SEVERE, null,
ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(MainMenu.class.getName()).log(java.util.logging.Level.SEVERE, null,
ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(MainMenu.class.getName()).log(java.util.logging.Level.SEVERE, null,
ex);
}
//</editor-fold>
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new MainMenu().setVisible(true);
}
});
}
P
// Variables declaration - do not modify
AP
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton5;
private javax.swing.JLabel jLabel1;
private javax.swing.JMenu jMenu1;
private javax.swing.JMenuBar jMenuBar1;
n
tio
private javax.swing.JMenuItem jMenuItem1;
private javax.swing.JMenuItem jMenuItem2;
lu
Student Information:-
package student.information.system;
SB
import net.proteanit.sql.DbUtils;
import java.awt.*;
M
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import javax.imageio.ImageIO;
import javax.swing.*;
public class StudentInformation extends javax.swing.JFrame {
Connection conn=null;
ResultSet rs=null;
PreparedStatement pst=null;
public StudentInformation() {
initComponents();
conn=db.java_db();
Toolkit toolkit = getToolkit();
Dimension size = toolkit.getScreenSize();
setLocation(size.width/2 - getWidth()/2,
size.height/2 - getHeight()/2);
currentDate();
Update_table();
txt_emp.setText(String.valueOf(Emp.empId).toString());
}
P
public void currentDate (){
AP
Calendar cal =new GregorianCalendar();
int month = cal.get(Calendar.MONTH);
int year = cal.get(Calendar.YEAR);
int day = cal.get(Calendar.DAY_OF_MONTH);
n
tio
lbl_date.setText((month+1)+"/"+day+"/"+year);
lu
So
//Time
lbl_time.setText(hour+":"+(minute)+":"+second);
M
try{
rs.close();
pst.close();
}
catch(Exception e){
}
}
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
P
jLabel7 = new javax.swing.JLabel();
AP
txt_tel = new javax.swing.JTextField();
txt_email = new javax.swing.JTextField();
jLabel6 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
r_male = new javax.swing.JRadioButton();
n
tio
r_female = new javax.swing.JRadioButton();
txt_dob = new javax.swing.JTextField();
lu
jMenu1.setText("File");
jMenuBar2.add(jMenu1);
jMenu2.setText("Edit");
jMenuBar2.add(jMenu2);
P
jDialog1.getContentPane().setLayout(jDialog1Layout);
AP
jDialog1Layout.setHorizontalGroup(
jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 400, Short.MAX_VALUE)
);
jDialog1Layout.setVerticalGroup(
n
tio
jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
lu
);
So
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setResizable(false);
TE
jLabel6.setText("Email :");
jLabel11.setText("Gender:");
r_male.setText("Male");
r_male.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
r_maleActionPerformed(evt);
}
});
r_female.setText("Female");
r_female.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
r_femaleActionPerformed(evt);
}
});
jLabel2.setText("Surname :");
txt_firstname.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
txt_firstnameActionPerformed(evt);
}
});
jDesktopPane1.setLayer(lbl_img, javax.swing.JLayeredPane.DEFAULT_LAYER);
P
javax.swing.GroupLayout jDesktopPane1Layout = new javax.swing.GroupLayout(jDesktopPane1);
AP
jDesktopPane1.setLayout(jDesktopPane1Layout);
jDesktopPane1Layout.setHorizontalGroup(
jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
n
.addGroup(jDesktopPane1Layout.createSequentialGroup()
.addContainerGap()
tio
.addComponent(lbl_img, javax.swing.GroupLayout.DEFAULT_SIZE, 231,
Short.MAX_VALUE)
lu
.addContainerGap())
So
);
jDesktopPane1Layout.setVerticalGroup(
jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
TE
.addGroup(jDesktopPane1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(lbl_img, javax.swing.GroupLayout.DEFAULT_SIZE, 145,
SB
Short.MAX_VALUE)
.addContainerGap())
);
M
jLabel15.setText("Apt./House No :");
txt_apt.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
txt_aptActionPerformed(evt);
}
});
cmd_save.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/Save-icon.png"))); //
NOI18N
cmd_save.setText("Add Record");
cmd_save.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmd_saveActionPerformed(evt);
}
});
jButton1.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/erase-128.png"))); //
NOI18N
jButton1.setText("Clear");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
P
});
AP
jButton2.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/update icon.png"))); //
NOI18N
jButton2.setText("Update");
n
tio
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
lu
jButton2ActionPerformed(evt);
So
}
});
TE
jButton3.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/delete_16x16.gif"))); //
NOI18N
SB
jButton3.setText("Delete");
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
M
jButton3ActionPerformed(evt);
}
});
jLabel5.setText("Student ID :");
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(r_male)
.addGap(4, 4, 4)
.addComponent(r_female))
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(txt_tel, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txt_email, javax.swing.GroupLayout.PREFERRED_SIZE, 168,
javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGroup(jPanel3Layout.createSequentialGroup()
P
AP
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1)
.addComponent(jLabel2)
.addComponent(jLabel3)
.addComponent(jLabel5))
n
tio
.addGap(58, 58, 58)
lu
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
So
.addComponent(txt_surname, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txt_firstname)
.addComponent(txt_dob)
TE
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel14)
M
.addComponent(jLabel15)
.addComponent(jLabel16)
.addComponent(jLabel8)
.addComponent(jLabel4))
.addGap(48, 48, 48)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txt_pc, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(txt_apt, javax.swing.GroupLayout.PREFERRED_SIZE, 168,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(txt_add2, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txt_address, javax.swing.GroupLayout.PREFERRED_SIZE, 168,
javax.swing.GroupLayout.PREFERRED_SIZE))))
.addComponent(txt_courseid, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addGap(57, 57, 57)
.addComponent(jDesktopPane1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel3Layout.createSequentialGroup()
.addGap(49, 49, 49)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(cmd_save, javax.swing.GroupLayout.PREFERRED_SIZE, 134,
P
javax.swing.GroupLayout.PREFERRED_SIZE)
AP
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 134,
javax.swing.GroupLayout.PREFERRED_SIZE))
n
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 134,
tio
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
lu
javax.swing.GroupLayout.PREFERRED_SIZE)))))
.addContainerGap(41, Short.MAX_VALUE))
);
TE
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
SB
jPanel3Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jDesktopPane1, javax.swing.GroupLayout.PREFERRED_SIZE,
M
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(32, 32, 32)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(cmd_save, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 44,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 44,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 44,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(186, 186, 186))
.addGroup(jPanel3Layout.createSequentialGroup()
.addGap(18, 18, 18)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel5)
.addComponent(txt_studentid, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1)
.addComponent(txt_firstname, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2)
.addComponent(txt_surname, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel3)
P
.addComponent(txt_dob, javax.swing.GroupLayout.PREFERRED_SIZE,
AP
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel11)
.addComponent(r_male)
n
tio
.addComponent(r_female))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
lu
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
So
.addComponent(txt_email, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel6))
TE
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txt_tel, javax.swing.GroupLayout.PREFERRED_SIZE,
SB
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel7))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
M
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txt_address, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel8))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txt_add2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel14))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txt_apt, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel15))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel16)
.addComponent(txt_pc, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel4)
.addComponent(txt_courseid, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
txt_emp.setText("emp");
jLabel10.setText("Logged in As :");
student_table.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
P
{null, null, null, null},
AP
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
n
tio
}
));
lu
jScrollPane1.setViewportView(student_table);
So
jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Search",
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
TE
jLabel13.setText("Student ID :");
txt_search1.addContainerListener(new java.awt.event.ContainerAdapter() {
M
P
.addComponent(jLabel13))
AP
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
File.setText("File"); n
tio
jMenuItem1.setText("Attach Image");
jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
lu
jMenuItem1ActionPerformed(evt);
}
});
TE
File.add(jMenuItem1);
jMenuBar1.add(File);
SB
lbl_date.setText("Date");
jMenuBar1.add(lbl_date);
M
lbl_time.setText("Time");
jMenuBar1.add(lbl_time);
setJMenuBar(jMenuBar1);
P
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
AP
.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(6, 6, 6) n
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
tio
.addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
lu
.addComponent(txt_emp))))
So
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
TE
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 516,
javax.swing.GroupLayout.PREFERRED_SIZE))
SB
.addContainerGap())
);
M
pack();
}// </editor-fold>
filename =f.getAbsolutePath();
ImageIcon imageIcon = new ImageIcon(new
ImageIcon(filename).getImage().getScaledInstance(lbl_img.getWidth(), lbl_img.getHeight(),
Image.SCALE_DEFAULT));
lbl_img.setIcon(imageIcon);
try {
File image = new File(filename);
FileInputStream fis = new FileInputStream (image);
ByteArrayOutputStream bos= new ByteArrayOutputStream();
byte[] buf = new byte[1024];
bos.write(buf,0,readNum);
}
person_image=bos.toByteArray();
}
catch(Exception e){
JOptionPane.showMessageDialog(null,e);
P
}
AP
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
txt_firstname.setText("");
n
tio
txt_surname.setText("");
txt_tel.setText("");
lu
txt_dob.setText("");
So
txt_email.setText("");
txt_address.setText("");
txt_courseid.setText("");
TE
txt_studentid.setText("");
txt_add2.setText("");
SB
txt_pc.setText("");
txt_apt.setText("");
lbl_img.setIcon(null);
M
txt_search1.setText("");
}
try {
String sql ="insert into Student_Information "
+ "(first_name,surname,Dob,Email,"
+ "Telephone,Address,"
+ "Image,Gender,Address2,"
+ "Post_code,Apartment,course_id) values (?,?,?,?,?,?,?,?,?,?,?,?) ";
pst=conn.prepareStatement(sql);
pst.setString(1,txt_firstname.getText());
pst.setString(2,txt_surname.getText());
pst.setString(3,txt_dob.getText());
pst.setString(4,txt_email.getText());
pst.setString(5,txt_tel.getText());
pst.setString(6,txt_address.getText());
pst.setBytes(7,person_image);
pst.setString(8,gender);
pst.setString(9,txt_add2.getText());
pst.setString(10,txt_pc.getText());
pst.setString(11,txt_apt.getText());
pst.setString(12,txt_courseid.getText());
pst.execute();
JOptionPane.showMessageDialog(null,"Data is saved successfully");
P
AP
}
catch (Exception e)
{ n
tio
}
lu
DateFormat df = DateFormat.getDateInstance();
String dateString = df.format(currentDate);
TE
String reg= "insert into Audit (emp_id, date, status) values ('"+val+"','"+value0+" /
"+value1+"','Added Record')";
pst=conn.prepareStatement(reg);
pst.execute();
}
catch (Exception e)
{
JOptionPane.showMessageDialog(null,e);
}
finally {
try{
rs.close();
pst.close();
catch(Exception e){
JOptionPane.showMessageDialog(null,e);
}
}
}
}
P
private void txt_firstnameActionPerformed(java.awt.event.ActionEvent evt) {
AP
// TODO add your handling code here:
}
n
private void r_femaleActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
tio
gender ="Female";
r_female.setSelected(true);
lu
r_male.setSelected(false);
So
}
TE
r_male.setSelected(true);
r_female.setSelected(false);
}
M
{
JOptionPane.showMessageDialog(null,e);
}
String sql ="delete from Student_Information where id=? ";
try{
pst=conn.prepareStatement(sql);
pst.setString(1, txt_studentid.getText());
pst.execute();
P
AP
JOptionPane.showMessageDialog(null,"Record Deleted");
}catch(Exception e){
JOptionPane.showMessageDialog(null, e);
n
tio
}finally {
lu
try{
So
rs.close();
pst.close();
TE
}
catch(Exception e){
SB
}
}
Update_table();
M
try{
P
AP
pst=conn.prepareStatement(sql);
pst.execute();
JOptionPane.showMessageDialog(null, "Record Updated");
}catch(Exception e){
n
tio
JOptionPane.showMessageDialog(null, e);
}
lu
So
{
JOptionPane.showMessageDialog(null,e);
}
finally {
try{
rs.close();
pst.close();
}
catch(Exception e){
}
}
Update_table();
}
P
AP
private void txt_search1ComponentRemoved(java.awt.event.ContainerEvent evt) {
// TODO add your handling code here:
}
n
private void txt_search1ActionPerformed(java.awt.event.ActionEvent evt) {
tio
// TODO add your handling code here:
}
lu
So
pst=conn.prepareStatement(sql);
pst.setString(1,txt_search1.getText());
rs=pst.executeQuery();
M
P
AP
byte[] img = rs.getBytes("Image");
ImageIcon imageIcon = new ImageIcon(new
ImageIcon(img).getImage().getScaledInstance(lbl_img.getWidth(), lbl_img.getHeight(),
Image.SCALE_SMOOTH));
lbl_img.setIcon(imageIcon);
n
tio
}catch(Exception e){
lu
So
}
finally {
TE
try{
rs.close();
SB
pst.close();
}
M
catch(Exception e){
}
}
}
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(StudentInformation.class.getName()).log(java.util.logging.Level.SEVER
E, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(StudentInformation.class.getName()).log(java.util.logging.Level.SEVER
E, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(StudentInformation.class.getName()).log(java.util.logging.Level.SEVER
E, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(StudentInformation.class.getName()).log(java.util.logging.Level.SEVER
E, null, ex);
}
P
//</editor-fold>
AP
//</editor-fold>
//</editor-fold>
//</editor-fold>
//</editor-fold>
//</editor-fold>
n
tio
//</editor-fold>
//</editor-fold>
lu
//</editor-fold>
So
//</editor-fold>
//</editor-fold>
//</editor-fold>
TE
//</editor-fold>
//</editor-fold>
//</editor-fold>
SB
//</editor-fold>
M
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new StudentInformation().setVisible(true);
}
});
}
P
private javax.swing.JMenuItem jMenuItem1;
AP
private javax.swing.JPanel jPanel3;
private javax.swing.JPanel jPanel4;
private javax.swing.JPanel jPanel5;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JMenu lbl_date;
n
tio
private javax.swing.JLabel lbl_img;
private javax.swing.JMenu lbl_time;
lu
Users:-
package student.information.system;
import javax.swing.JOptionPane;
import java.awt.*;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.Calendar;
import java.util.GregorianCalendar;
import javax.swing.*;
import net.proteanit.sql.DbUtils;
P
PreparedStatement pst=null;
AP
public Audit_details() {
initComponents();
conn=db.java_db();
Toolkit toolkit = getToolkit();
Dimension size = toolkit.getScreenSize();
n
tio
setLocation(size.width/2 - getWidth()/2,
size.height/2 - getHeight()/2);
lu
So
Update_table3();
}
TE
try{
M
pst=conn.prepareStatement(sql);
rs=pst.executeQuery();
tbl_3.setModel(DbUtils.resultSetToTableModel(rs));
}
catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}
finally {
try{
rs.close();
pst.close();
}
catch(Exception e){
}
}
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
P
jPanel4 = new javax.swing.JPanel();
AP
jLabel2 = new javax.swing.JLabel();
txt_search = new javax.swing.JTextField();
n
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setResizable(false);
tio
jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Login_Record",
lu
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
So
tbl_3.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
SB
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
jScrollPane3.setViewportView(tbl_3);
jButton1.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/erase-128.png"))); //
NOI18N
jButton1.setText("Reset");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 557,
Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel3Layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(jButton1)))
.addContainerGap())
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
P
.addGroup(jPanel3Layout.createSequentialGroup()
AP
.addContainerGap()
.addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 327,
Short.MAX_VALUE)
n
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jButton1)
tio
.addGap(6, 6, 6))
);
lu
So
jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Search",
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Adobe Arabic", 1, 14))); //
TE
NOI18N
jLabel2.setText("ID:");
SB
txt_search.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent evt) {
M
txt_searchKeyReleased(evt);
}
});
P
.addGroup(layout.createSequentialGroup()
AP
.addContainerGap()
.addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
.addContainerGap()) n
tio
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
lu
.addGroup(layout.createSequentialGroup()
So
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
M
pack();
}// </editor-fold>
pst=conn.prepareStatement(sql);
pst.setString(1,txt_search.getText());
rs=pst.executeQuery();
tbl_3.setModel(DbUtils.resultSetToTableModel(rs));
}catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}
finally {
try{
rs.close();
pst.close();
}
catch(Exception e){
}
}
P
AP
}
}
TE
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
M
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(Audit_details.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Audit_details.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Audit_details.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Audit_details.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
}
//</editor-fold>
//</editor-fold>
//</editor-fold>
//</editor-fold>
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Audit_details().setVisible(true);
}
});
}
P
private javax.swing.JLabel jLabel2;
AP
private javax.swing.JPanel jPanel3;
private javax.swing.JPanel jPanel4;
private javax.swing.JScrollPane jScrollPane3;
private javax.swing.JTable tbl_3;
private javax.swing.JTextField txt_search;
n
tio
// End of variables declaration
}
lu
So
Audit details:-
package student.information.system;
import javax.swing.JOptionPane;
TE
import java.awt.*;
import java.sql.Connection;
import java.sql.PreparedStatement;
SB
import java.sql.ResultSet;
import java.util.Calendar;
import java.util.GregorianCalendar;
M
import javax.swing.*;
import net.proteanit.sql.DbUtils;
Update_table3();
}
pst=conn.prepareStatement(sql);
rs=pst.executeQuery();
tbl_3.setModel(DbUtils.resultSetToTableModel(rs));
}
catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}
P
finally {
AP
try{
rs.close(); n
pst.close();
tio
}
lu
catch(Exception e){
So
}
}
}
TE
SB
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
M
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setResizable(false);
jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Login_Record",
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Adobe Arabic", 1, 14))); //
NOI18N
tbl_3.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
jScrollPane3.setViewportView(tbl_3);
jButton1.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/erase-128.png"))); //
P
NOI18N
AP
jButton1.setText("Reset");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
n
jButton1ActionPerformed(evt);
tio
}
});
lu
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
TE
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
SB
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel3Layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(jButton1)))
.addContainerGap())
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 327,
Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jButton1)
.addGap(6, 6, 6))
);
jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Search",
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Adobe Arabic", 1, 14))); //
NOI18N
jLabel2.setText("ID:");
txt_search.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent evt) {
txt_searchKeyReleased(evt);
}
});
P
.addGroup(jPanel4Layout.createSequentialGroup()
AP
.addContainerGap()
.addComponent(jLabel2)
.addGap(18, 18, 18) n
.addComponent(txt_search)
tio
.addContainerGap())
);
lu
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
So
.addGroup(jPanel4Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
TE
.addComponent(txt_search, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel2))
SB
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
M
pack();
}// </editor-fold>
P
String sql ="select * from Audit where emp_id=? "
AP
pst=conn.prepareStatement(sql);
pst.setString(1,txt_search.getText()); n
rs=pst.executeQuery();
tio
tbl_3.setModel(DbUtils.resultSetToTableModel(rs));
lu
So
}catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}
TE
finally {
try{
SB
rs.close();
M
pst.close();
}
catch(Exception e){
}
}
}
Update_table3();
txt_search.setText("");
}
public static void main(String args[]) {
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(Audit_details.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Audit_details.class.getName()).log(java.util.logging.Level.SEVERE,
P
null, ex);
AP
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Audit_details.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
n
tio
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Audit_details.class.getName()).log(java.util.logging.Level.SEVERE,
lu
null, ex);
So
}
//</editor-fold>
//</editor-fold>
TE
//</editor-fold>
//</editor-fold>
SB
P
AP
n
tio
lu
So
TE
SB
M
7. OUTPUT OF MICRO PROJECT :-
Login:-
P
AP
n
tio
lu
So
Mainmenu:-
TE
SB
M
StudentInformation:-
P
Users:-
AP
n
tio
lu
So
TE
SB
M
Audit:-
M
SB
TE
So
lu
tio
n
AP
P
8. SKILL DEVELOPMENT /LEARNING OUT OF THIS MICROPRJECT
We learned to create GUI application in java. Also we learned the concept of Event handing in JAVA
language code. We became able to create GUI application using awt, swing, event handling and database.Also
learned to create packages to reuse the code once written.
P
AP
n
tio
lu
So
TE
SB
M
9. Applications of the Micro-Project:-
Smart management of student’s data.
Better Performance by Students.
Easy access to all.
Smart communication between teachers and student.
Low Investment
P
AP
n
tio
lu
So
TE
SB
M