MCA Project Report On JAVA Studio
MCA Project Report On JAVA Studio
Title of Project
1
Employee Transfer Management System
1. INTRODUCTION
Update records
2
Employee Transfer Management System
2. OBJECTIVES
This system have good management of data, along with integrity and
minimizing redundancy
The new system provides easier work than existing system for the Human
Resource Department.
The new system is secure system, that can be accessed only by authorised
users.
3
Employee Transfer Management System
But Java Studio Creator and MS SQL Server 2005 are the technologies
that I am going to use as front end and back end respectively in my Project.
I have chosen Java Studio Creator for Front end because it provide quick
software development, it support ActiveX tools, and it also provides quick error
detection and correction and I choose MS SQL server 2005 since it require less
system requirement than Oracle.
System Requirement:-
4
Employee Transfer Management System
4. MODULES DESCIPTION
There are mainly two modules in the proposed project which will
interact with this project. Which are described below,
ADMINISTRATOR
In this module administrator is the person with all administrative
privileges, of the system, who can update, create and accept any enquiry
related to the employee transfer. An administrator will also generate
different documents related to the employee transfer.
EMPLOYEE
This is the second module of this project which is related to the
employee. This module have restricted access to the system. In this module
an employee can submit his/her request for transfer and will be able to
search any transfer related details but would not be authorised to edit or
update the details.
5
Employee Transfer Management System
5. ANALYSIS
Problem Definition
Under the existing system Browse Wire IT Solutions uses the mannually
prepared database for the employee records. The manually preparation of the data
on the register is really tedious and error prone. Staff manageement and transfer
management is not easy through this system.
6
Employee Transfer Management System
Proposed System
7
Employee Transfer Management System
To design and develop the proposed system to solve the problem with the
existing system, the developer is responsible for the following events:
8
Employee Transfer Management System
Conducting any user training that might be necessary for using the
system.
Maintaining the system after installing.
Feasibility Study
Behavioral Feasibility
Technical Feasibility
Economic Feasibility
Behavioral Feasibility
Technical Feasibility
All the necessary resources (Hardware and Software) have been gathered
that are necessary for development of the proposed system. The Browse Wire IT
Solutions is ready to adopt new system and to upgrade existing system. Therefore,
the system is technically very much feasible.
Economic Feasibility
Cost/Benefit Analysis
9
Employee Transfer Management System
Information Gathering
Information gathering is an art and a science. The approach and the manner
in which information is gathered require persons with sensitivity and common
sense and knowledge of what information is to gather and when to gather. There
are many methods to gather the information. Before applying these methods the
analyst has to be familiar with current system.
1. Interviews
2. Questionnaires
Structured Analysis
10
Employee Transfer Management System
modeling. In doing so, it satisfies the second operational analysis principle (i.e.
creating a functional model).
11
Employee Transfer Management System
Employee
Employee
Transfer
Transfer Document
Generation
Management
Management Transfer
System
System Documents
uest
nsf er Req ery
Tra & Qu
Emp
loy
Requ ee’s
Employee est
Transfer
Request
12
Employee Transfer Management System
System
Username
Administrator & Password
Verification Verification Employee
Employee
Enter Username Verify Username Success Transfer
Transfer
& Password &Password Management
Management
System
System
Employee
Verification
Fail
Error Message
13
Employee Transfer Management System
Employee
Employee Check Status Request
Request Accepted
Transfer
Transfer Verify Transfer Transfer
Employee Management Status Successful
Management
For Transfer System
System
Request
Rejected
Transfer Request
Pending
14
Employee Transfer Management System
Make Transfer
Employee Request
Employee
Employee
Transfer
Transfer EmployeeTransfer
Management
Management Request
System
System
System Admin. Check
Check/Grant Requests
Requests
Request
Request
Rejected
Accepted
Update
Database
Inform Employee EmployeeTransfer
Employee Transferred Details
3RDLEVEL DFD
15
Employee Transfer Management System
16
Employee Transfer Management System
17
Employee Transfer Management System
6. SYSTEM DESIGN
Introduction
to organize and convert the data through system flowcharts, data flow diagrams,
structured English, decision tables and the like which support future development
of the system.
The Data flow diagrams and various processing logic techniques show
how, where, and when data are used or changed in an information system, but
these techniques do not show the definition, structure and relationships within the
data.
This is analogous to the architect’s blueprint as a starting point for system design.
The design is a solution, a “how to” approach, compared to analysis, a “what is”
orientation.
also referred as data modeling. The most common formatted used the E-R notation
explains the characteristics and structure of data independent of how the data may
The process of system design can be divided into three stages. They are:
18
Employee Transfer Management System
necessary for implementing the system. The steps involved during system design
were as follow: -
The current physical system was thoroughly reviewed from point of view
how the data flows, what are its file contents, its volumes and frequency etc.
After this input, output specifications security & control specification were
prepared. It was also decided that how physical information will flow through the
2. OUTPUT DESIGN
user. Efficient intelligible output design improves the system’s relationship with
the user and help in decision making. A major form of output is a hardcopy from
printer. The format of outputs is designed in such a way that it is simple to read
and interpret In the present output we have clearly labeled title it contains date and
3. INPUT DESIGN
computer based format in accurate input data are the most cause of errors in data
processing. So, the input should be well design and error free. Input data is
collected and organized into groups of similar data once identified appropriate
19
Employee Transfer Management System
4. SCREEN DESIGN
The screen design for inputting the inputs were also panned as the format of
inputs.
5. INTERFACE DESIGN
identifies objects and action and then creates a screen layout that forms the basis
asked about the attributes that he would like to have in the GUI interface.
the possibilities such as using mnemonics for Particular action, providing visual
cues etc. are worked out to make user comfortable working with our software and
20
Employee Transfer Management System
layout. Visual layout is based on a real world image. Entry filling process first
shows list that is for categorizing information and then information is saved
Different indications are provided to enable the user to know the context of
Indications
industry grows it becoming more and more versatile. There are number of
interaction device present in the Market like keyboard, mouse, digital pen, voice
recognition commands etc. which can be used for giving input. Also interaction is
not only concerted with device interaction, it is also concerned with system
interaction mean how much comfortable user feels while interaction with system.
thought mouse or someone thought keyboard therefore choice have been provided
21
Employee Transfer Management System
to user for using for using mouse and keyboard. Software interact equally well
sequence of action the use can interrupt the sequence to do something else (without
Login Screen
When a user starts the software, the first form he encounters is the login
form. In the login form the user has to choose store name then fill his Username
and password. The form is used to keep check in, so that unauthorized users are
22
Employee Transfer Management System
8. DATABASE DESIGN
Table : AdminDetails
This table stores the information about a particular administrator. This table
has 8 field and represents different attributes of the system administrator.
The ‘AdminID’ serves as the primary key.
Table : EmployeeDetails
This table stores the information about a particular administrator. This table
has 8 field and represents different attributes of the system administrator.
The ‘EmployeeID’ serves as the primary key.
23
Employee Transfer Management System
Table : EmployeeTransferDetails
This table stores the information about a particular administrator. This table
has 10 field and represents different attributes of the system administrator.
The ‘EmployeeID’ serves as the foreign key.
Table : EmployeeTransferRequest
This table stores the information about a particular administrator. This table
has 9 field and represents different attributes of the system administrator.
The ‘EmployeeID’ serves as the foreign key.
24
Employee Transfer Management System
MAIN PAGE
package Employee;
import javax.swing.JOptionPane;
import javax.swing.JDialog;
import java.util.*;
public MainPage() {
date=new Date();
initComponents();
}
25
Employee Transfer Management System
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowOpened(java.awt.event.WindowEvent evt) {
formWindowOpened(evt);
}
});
26
Employee Transfer Management System
27
Employee Transfer Management System
28
Employee Transfer Management System
29
Employee Transfer Management System
30
Employee Transfer Management System
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new MainPage().setVisible(true);
}
});
}
31
Employee Transfer Management System
/*
* AdminLogin.java
*
* Created on August 25, 2009, 11:24 AM
*/
package Employee;
import java.sql.*;
import javax.swing.JOptionPane;
import javax.swing.JDialog;
import java.util.Date;
/**
*
* @author user
*/
public class AdminLogin extends javax.swing.JFrame {
Date date;
JOptionPane pane;
Statement stmt;
Connection con;
32
Employee Transfer Management System
ResultSet rs;
public AdminLogin() {
date=new Date();
Connection();
initComponents();
}
void Connection()
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(ClassNotFoundException es)
{
pane.showMessageDialog(this,"Class Not
Found"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
try
{
String str="Jdbc:Odbc:Employee";
con=DriverManager.getConnection(str);
this.stmt=con.createStatement();
}
catch(SQLException es)
{
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
addWindowListener(new java.awt.event.WindowAdapter() {
33
Employee Transfer Management System
34
Employee Transfer Management System
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jLabel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 90,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jbtnLogin,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 104,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jPanel1Layout.createSequentialGroup()
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jLabel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 128,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)))
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.add(47, 47, 47)
.add(jbtnCancel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 109,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(jPanel1Layout.createSequentialGroup()
.add(71, 71, 71)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING,
jPanel1Layout.createSequentialGroup()
.add(jtxtUserName, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
194, Short.MAX_VALUE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))
.add(jtxtPassword, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
182, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))))
.add(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.add(jbtnLogOut, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 92,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(121, 121, 121)
.add(jLabel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 123,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(69, 69, 69))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.addContainerGap(24, Short.MAX_VALUE)
.add(jLabel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 24,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.add(47, 47, 47)
.add(jLabel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 27,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(jPanel1Layout.createSequentialGroup()
.add(34, 34, 34)
.add(jtxtUserName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 32,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(34, 34, 34)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 24,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
35
Employee Transfer Management System
36
Employee Transfer Management System
37
Employee Transfer Management System
if(rs.next())
{
pane.showMessageDialog(this,"Wel Come Mr "+this.jtxtUserName.getText()+" in Admin
Page","Information",pane.INFORMATION_MESSAGE);
AdminPages objAdmin=new AdminPages(this.jtxtUserName.getText());
objAdmin.setVisible(true);
this.setVisible(false);
}
else
{
pane.showMessageDialog(this,"Admin ID and Password Not
Matched","Error",pane.ERROR_MESSAGE);
}
}
catch(SQLException es)
{
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"ERROR",pane.ERROR_MESSAGE);
}
}//GEN-LAST:event_jbtnLoginActionPerformed
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new AdminLogin().setVisible(true);
}
});
38
Employee Transfer Management System
39
Employee Transfer Management System
/*
* NewAdminPage.java
*
* Created on August 26, 2009, 9:17 AM
*/
package Employee;
import java.sql.*;
import java.util.Date;
import javax.swing.*;
/**
*
* @author user
*/
public class NewAdminPage extends javax.swing.JFrame {
JOptionPane pane;
Statement stmt;
Connection con;
ResultSet rs;
Date date;
public NewAdminPage() {
date=new Date();
Connection();
initComponents();
40
Employee Transfer Management System
}
void Connection()
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(ClassNotFoundException es)
{
pane.showMessageDialog(this,"Class Not
Found"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
try
{
String str="Jdbc:Odbc:Employee";
con=DriverManager.getConnection(str);
this.stmt=con.createStatement();
}
catch(SQLException es)
{
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
41
Employee Transfer Management System
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowIconified(java.awt.event.WindowEvent evt) {
formWindowIconified(evt);
}
public void windowOpened(java.awt.event.WindowEvent evt) {
formWindowOpened(evt);
}
});
42
Employee Transfer Management System
43
Employee Transfer Management System
jtxtRetype.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
jtxtRetypeFocusLost(evt);
}
});
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(jPanel4Layout.createSequentialGroup()
.add(jLabel5)
.add(29, 29, 29)
.add(jtxtAdminName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
169, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(org.jdesktop.layout.GroupLayout.LEADING,
jPanel4Layout.createSequentialGroup()
.add(jLabel10)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jtxtRetype, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 169,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))
.add(jPanel4Layout.createSequentialGroup()
44
Employee Transfer Management System
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jLabel7)
.add(jLabel8))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 7,
Short.MAX_VALUE)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jtxtPassword, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 169,
Short.MAX_VALUE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jtxtAdminID,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 169,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))))
.add(jPanel4Layout.createSequentialGroup()
.add(75, 75, 75)
.add(jLabel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 177,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(jPanel4Layout.createSequentialGroup()
.add(59, 59, 59)
.add(jLabel9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 224,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel4Layout.createSequentialGroup()
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 51,
Short.MAX_VALUE)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
.add(jLabel14, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jLabel13, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jLabel12, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jLabel11, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.add(29, 29, 29)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jtxtAddress,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 169,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jtxtCity,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 169,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jtxtPhoneNo,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 169,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jtxtEmail,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 169,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(jPanel4Layout.createSequentialGroup()
.add(14, 14, 14)
.add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 126,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jButton2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
45
Employee Transfer Management System
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 7,
Short.MAX_VALUE)
.add(jButton3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 71,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(42, 42, 42))
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel4Layout.createSequentialGroup()
.add(23, 23, 23)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel5)
.add(jtxtAdminName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jtxtAddress, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel11))
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING,
false)
.add(jPanel4Layout.createSequentialGroup()
.add(16, 16, 16)
.add(jLabel6)
.add(18, 18, 18)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(jtxtAdminID, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel7))
.add(46, 46, 46)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel8)
.add(jtxtPassword, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(19, 19, 19)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel9)
.add(jLabel14)))
.add(jPanel4Layout.createSequentialGroup()
.add(29, 29, 29)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jtxtCity, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel12))
.add(34, 34, 34)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jtxtPhoneNo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel13))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jtxtEmail, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(jPanel4Layout.createSequentialGroup()
46
Employee Transfer Management System
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel10)
.add(jtxtRetype, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addContainerGap(22, Short.MAX_VALUE))
.add(jPanel4Layout.createSequentialGroup()
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jButton1)
.add(jButton2)
.add(jButton3))
.addContainerGap())))
);
47
Employee Transfer Management System
48
Employee Transfer Management System
49
Employee Transfer Management System
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 13,
Short.MAX_VALUE)
.add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(18, 18, 18))
.add(layout.createSequentialGroup()
.add(46, 46, 46)
.add(jLabel18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(59, 59, 59)
.add(jLabel19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(73, 73, 73))))
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jLabel17, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(24, 24, 24)
.add(jLabel16, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 208,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(66, 66, 66)))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
);
pack();
}// </editor-fold>//GEN-END:initComponents
50
Employee Transfer Management System
}//GEN-LAST:event_jButton1ActionPerformed
}//GEN-LAST:event_jButton2ActionPerformed
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
FIRST:event_jButton4ActionPerformed
AdminLogin obj1=new AdminLogin();
obj1.setVisible(true);
this.setVisible(false);
}//GEN-LAST:event_jButton4ActionPerformed
private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-
FIRST:event_formWindowOpened
this.jlblTime.setText(this.date.toString());
}//GEN-LAST:event_formWindowOpened
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewAdminPage().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JButton jButton4;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
51
Employee Transfer Management System
52
Employee Transfer Management System
ADMIN PAGE
* AdminPages.java
*
* Created on August 26, 2009, 12:14 PM
*/
package Employee;
import java.sql.*;
import java.util.Date;
import javax.swing.*;
/**
*
* @author user
*/
public class AdminPages extends javax.swing.JFrame {
JOptionPane pane;
Statement stmt;
Connection con;
ResultSet rs;
Date date;
String Name;
public AdminPages(String n) {
Name=n;
date=new Date();
Connection();
initComponents();
}
void Connection()
53
Employee Transfer Management System
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(ClassNotFoundException es)
{
pane.showMessageDialog(this,"Class Not
Found"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
try
{
String str="Jdbc:Odbc:Employee";
con=DriverManager.getConnection(str);
this.stmt=con.createStatement();
}
catch(SQLException es)
{
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jlblTime = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jlblName = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jPanel1 = new javax.swing.JPanel();
jPanel3 = new javax.swing.JPanel();
jLabel10 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
jLabel18 = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton4 = new javax.swing.JButton();
jLabel19 = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
jButton5 = new javax.swing.JButton();
jButton7 = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowActivated(java.awt.event.WindowEvent evt) {
formWindowActivated(evt);
}
54
Employee Transfer Management System
55
Employee Transfer Management System
56
Employee Transfer Management System
57
Employee Transfer Management System
58
Employee Transfer Management System
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 22,
Short.MAX_VALUE)
.add(jLabel19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 84,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(21, 21, 21))
.add(layout.createSequentialGroup()
.add(30, 30, 30)
.add(jButton5)
.addContainerGap())))
.add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(layout.createSequentialGroup()
.add(109, 109, 109)
.add(jLabel7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 773,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(188, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 49,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(23, 23, 23)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 167,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jlblTime, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 33,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
.add(15, 15, 15)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jLabel2)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 111,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 111,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 19,
Short.MAX_VALUE)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 45,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jlblName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 36,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jLabel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 167,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
.add(15, 15, 15)
.add(jLabel7)
.add(19, 19, 19)
.add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
59
Employee Transfer Management System
.add(layout.createSequentialGroup()
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jLabel9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 37,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jButton4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 37,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jButton2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 37,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jButton7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 37,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(layout.createSequentialGroup()
.add(14, 14, 14)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jButton5))
.add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
);
pack();
}// </editor-fold>
60
Employee Transfer Management System
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
// new AdminPages().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton4;
private javax.swing.JButton jButton5;
private javax.swing.JButton jButton7;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel18;
private javax.swing.JLabel jLabel19;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
private javax.swing.JLabel jlblName;
private javax.swing.JLabel jlblTime;
// End of variables declaration
61
Employee Transfer Management System
UPDATEEMPLOYEETRANSFER
/*
* UpdateEmployeeTransfer.java
*
* Created on August 29, 2009, 9:32 AM
*/
package Employee;
import java.sql.*;
import java.util.Date;
import javax.swing.*;
/**
*
* @author user
*/
public class UpdateEmployeeTransfer extends javax.swing.JFrame {
JOptionPane pane;
Statement stmt;
Connection con;
ResultSet rs;
Date date;
String name;
public UpdateEmployeeTransfer(String n) {
name=n;
date=new Date();
62
Employee Transfer Management System
Connection();
initComponents();
}
void Connection()
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(ClassNotFoundException es)
{
pane.showMessageDialog(this,"Class Not
Found"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
try
{
String str="Jdbc:Odbc:Employee";
con=DriverManager.getConnection(str);
this.stmt=con.createStatement();
}
catch(SQLException es)
{
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
63
Employee Transfer Management System
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowOpened(java.awt.event.WindowEvent evt) {
formWindowOpened(evt);
}
});
64
Employee Transfer Management System
65
Employee Transfer Management System
.add(jLabel5)))
.addContainerGap(20, Short.MAX_VALUE))
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel5Layout.createSequentialGroup()
.addContainerGap()
.add(jLabel5)
.add(16, 16, 16)
.add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel9)
.add(jcboDate, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 31,
Short.MAX_VALUE))
.addContainerGap())
);
66
Employee Transfer Management System
.add(jtxtCurrentDepartment, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
194, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jtxtJoiningDate, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 194,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jtxtTransferDepartment, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
194, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(40, 40, 40))
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel3Layout.createSequentialGroup()
.add(21, 21, 21)
.add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel11)
.add(jtxtCurrentDepartment, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
28, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(26, 26, 26)
.add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel20)
.add(jtxtTransferDepartment, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
28, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(37, 37, 37)
.add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(jLabel12, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jtxtJoiningDate, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(32, 32, 32)
.add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(jLabel13)
.add(jtxtTransferLocation, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(19, 19, 19)
.add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(jtxtCurrentLocation, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel14))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 35, Short.MAX_VALUE)
.add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jtxtWorkExperience, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel15))
.add(32, 32, 32))
);
jlstID.setEnabled(false);
jlstName.setEnabled(false);
67
Employee Transfer Management System
jLabel10.setText("Employee Role");
jlstEmployeeRole.setEnabled(false);
68
Employee Transfer Management System
.add(org.jdesktop.layout.GroupLayout.TRAILING,
jPanel4Layout.createSequentialGroup()
.add(jlstEmployeeRole, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 60,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(25, 25, 25))))
);
69
Employee Transfer Management System
70
Employee Transfer Management System
71
Employee Transfer Management System
.add(jButton3)
.add(jButton4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(layout.createSequentialGroup()
.add(14, 14, 14)
.add(jPanel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(15, 15, 15)
.add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jlblTime, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 33,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
);
pack();
}// </editor-fold>
72
Employee Transfer Management System
try
{
String str="select TransferRelivingDate from EmployeeTransferDetails";
rs=this.stmt.executeQuery(str);
if(rs.next())
{
int cnt=0;
do
{
this.jcboDate.insertItemAt(rs.getString(1),cnt);
cnt++;
}while(rs.next());
}
else
{
pane.showMessageDialog(this,"Record Not Found","ERROR",pane.ERROR_MESSAGE);
}
}catch(SQLException es) {
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
}
int cnt=0;
do
{
this.jlstID.add(rs.getString(1),cnt);
this.jlstName.add(rs.getString(2),cnt);
this.jlstEmployeeRole.add(rs.getString(3),cnt);
cnt++;
this.jtxtWorkExperience.setText(rs.getString(4));
this.jtxtCurrentDepartment.setText(rs.getString(5));
this.jtxtTransferDepartment.setText(rs.getString(6));
this.jtxtJoiningDate.setText(rs.getString(7));
this.jtxtCurrentLocation.setText(rs.getString(8));
this.jtxtTransferLocation.setText(rs.getString(9));
73
Employee Transfer Management System
}while(rs.next());
this.jbtnUpdate.setEnabled(true);
this.jbtnReferesh.setEnabled(true);
} else {
pane.showMessageDialog(this,"Record Not Found","Error",pane.ERROR_MESSAGE);
}
} catch(SQLException es) {
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
// new UpdateEmployeeTransfer().setVisible(true);
}
});
}
74
Employee Transfer Management System
75
Employee Transfer Management System
EMPLOYEE LOGIN
/*
* Employee_Login.java
*
* Created on August 26, 2009, 1:14 PM
*/
package Employee;
import java.sql.*;
import javax.swing.JOptionPane;
import javax.swing.JDialog;
import java.util.Date;
/**
*
* @author user
*/
public class Employee_Login extends javax.swing.JFrame {
Date date;
JOptionPane pane;
Statement stmt;
Connection con;
76
Employee Transfer Management System
ResultSet rs;
public Employee_Login() {
date=new Date();
Connection();
initComponents();
}
void Connection()
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(ClassNotFoundException es)
{
pane.showMessageDialog(this,"Class Not
Found"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
try
{
String str="Jdbc:Odbc:Employee";
con=DriverManager.getConnection(str);
this.stmt=con.createStatement();
}
catch(SQLException es)
{
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
77
Employee Transfer Management System
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowOpened(java.awt.event.WindowEvent evt) {
formWindowOpened(evt);
}
});
78
Employee Transfer Management System
79
Employee Transfer Management System
.add(jPanel1Layout.createSequentialGroup()
.add(13, 13, 13)
.add(jLabel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 27,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(34, 34, 34)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 24,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jtxtPassword, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(44, 44, 44)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jbtnLogin, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 34,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jbtnCancel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 33,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(25, 25, 25))
);
80
Employee Transfer Management System
jLabel14.setText("jLabel9");
81
Employee Transfer Management System
.add(jbtnClickHere, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
116, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 43,
Short.MAX_VALUE)
.add(lblTime, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 265,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))))
.add(40, 40, 40))
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jLabel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 111,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(layout.createSequentialGroup()
.add(jLabel1)
.add(28, 28, 28)
.add(jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
.add(layout.createSequentialGroup()
.add(21, 21, 21)
.add(jLabel7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 111,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(63, 63, 63)
.add(jLabel10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(32, 32, 32)
.add(jLabel11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(38, 38, 38)
.add(jLabel12, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(67, 67, 67))
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 14,
Short.MAX_VALUE)
.add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(54, 54, 54))
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.add(31, 31, 31)
.add(jLabel13, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(50, 50, 50)
.add(jLabel14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 53,
Short.MAX_VALUE)
.add(jLabel9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(66, 66, 66)))
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
82
Employee Transfer Management System
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
83
Employee Transfer Management System
84
Employee Transfer Management System
EMPLOYEE PAGE
/*
* EmployeePage.java
*
* Created on August 26, 2009, 2:37 PM
*/
package Employee;
import java.sql.*;
import java.util.Date;
import javax.swing.*;
/**
*
* @author user
*/
public class EmployeePage extends javax.swing.JFrame {
JOptionPane pane;
Statement stmt;
Connection con;
ResultSet rs;
Date date;
String Name;
public EmployeePage(String n) {
Name=n;
date=new Date();
initComponents();
}
85
Employee Transfer Management System
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowOpened(java.awt.event.WindowEvent evt) {
formWindowOpened(evt);
}
});
86
Employee Transfer Management System
jLabel16.setText("jLabel16");
87
Employee Transfer Management System
88
Employee Transfer Management System
89
Employee Transfer Management System
90
Employee Transfer Management System
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 45,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jlblName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 36,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(layout.createSequentialGroup()
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jLabel17, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 190,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(layout.createSequentialGroup()
.add(15, 15, 15)
.add(jLabel16, 0, 0, Short.MAX_VALUE)))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jLabel7)
.add(14, 14, 14)
.add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
.add(layout.createSequentialGroup()
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jLabel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 151,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))
.add(layout.createSequentialGroup()
.add(16, 16, 16)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jButton5)))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 27,
Short.MAX_VALUE)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jButton4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 37,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jButton7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 37,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jButton6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 37,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(23, 23, 23)))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
pack();
}// </editor-fold>
91
Employee Transfer Management System
this.setVisible(false);
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
//new EmployeePage().setVisible(true);
}
});
}
92
Employee Transfer Management System
93
Employee Transfer Management System
TRANSFER REQUEST
/*
* EmployeeTransferRequest.java
*
* Created on August 27, 2009, 10:18 AM
*/
package Employee;
import java.sql.*;
import java.util.Date;
import javax.swing.*;
/**
*
* @author user
*/
public class EmployeeTransferRequest extends javax.swing.JFrame {
JOptionPane pane;
Statement stmt;
Connection con;
ResultSet rs;
Date date;
String name;
public EmployeeTransferRequest(String n) {
name=n;
date=new Date();
Connection();
initComponents();
}
94
Employee Transfer Management System
void Connection()
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(ClassNotFoundException es)
{
pane.showMessageDialog(this,"Class Not
Found"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
try
{
String str="Jdbc:Odbc:Employee";
con=DriverManager.getConnection(str);
this.stmt=con.createStatement();
}
catch(SQLException es)
{
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
95
Employee Transfer Management System
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowOpened(java.awt.event.WindowEvent evt) {
formWindowOpened(evt);
}
});
96
Employee Transfer Management System
97
Employee Transfer Management System
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.add(jLabel18)
.addContainerGap())
);
jtxtAdminName.setEditable(false);
jtxtAdminID.setEditable(false);
98
Employee Transfer Management System
});
99
Employee Transfer Management System
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
.add(jLabel20, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jLabel19, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jLabel14, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jLabel13, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 159,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(29, 29, 29)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
.add(org.jdesktop.layout.GroupLayout.TRAILING,
jPanel4Layout.createSequentialGroup()
.add(jtxtCurrentProject, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
187, Short.MAX_VALUE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))
.add(org.jdesktop.layout.GroupLayout.TRAILING, jtxtCurrentLocation)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jtxtTranserProject)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jtxtTransferLocation))))
.add(67, 67, 67))
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel4Layout.createSequentialGroup()
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel4Layout.createSequentialGroup()
.add(21, 21, 21)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel13)
.add(jtxtCurrentProject, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
28, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
.add(jPanel4Layout.createSequentialGroup()
.add(173, 173, 173)
.add(jLabel20))
.add(jPanel4Layout.createSequentialGroup()
.add(29, 29, 29)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel14)
.add(jtxtCurrentLocation,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jtxtAdminID, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
28, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel9))
.add(34, 34, 34)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel19)
.add(jtxtTranserProject,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
100
Employee Transfer Management System
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(jtxtTransferLocation,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jtxtWorExperience,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel12))))))
.add(jPanel4Layout.createSequentialGroup()
.add(23, 23, 23)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel7)
.add(jtxtAdminName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 34, Short.MAX_VALUE)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel27)
.add(jcboDepartment, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 33,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel4Layout.createSequentialGroup()
.addContainerGap(283, Short.MAX_VALUE)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jButton3)
.add(jButton2)
.add(jButton1))
.addContainerGap())
);
101
Employee Transfer Management System
102
Employee Transfer Management System
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(layout.createSequentialGroup()
.add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
.add(layout.createSequentialGroup()
.add(45, 45, 45)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 24,
Short.MAX_VALUE)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(jLabel23, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 46,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel24, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 46,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel25, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 46,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel26, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 46,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
.add(layout.createSequentialGroup()
.add(jLabel21, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 123,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(45, 45, 45)
.add(jPanel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(43, 43, 43)
.add(jButton4)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 16,
Short.MAX_VALUE)
.add(jLabel22, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 123,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(19, 19, 19))))
.add(jLabel11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 46,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(33, 33, 33)
.add(jLabel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 111,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(layout.createSequentialGroup()
.add(50, 50, 50)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(32, 32, 32)
103
Employee Transfer Management System
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel16)
.add(jLabel17)))
.add(layout.createSequentialGroup()
.add(22, 22, 22)
.add(jLabel6)
.add(15, 15, 15)
.add(jlblTime, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 33,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
.add(layout.createSequentialGroup()
.add(23, 23, 23)
.add(jLabel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 111,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(14, 14, 14)
.add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(layout.createSequentialGroup()
.addContainerGap()
.add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(16, 16, 16)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jLabel21)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel22)
.add(jButton4))
.add(jPanel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(27, 27, 27)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(jLabel23, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(22, 22, 22)
.add(jLabel24, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(20, 20, 20)
.add(jLabel25, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(27, 27, 27)
.add(jLabel26, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 28, Short.MAX_VALUE)
.add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(jLabel11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
);
pack();
}// </editor-fold>
104
Employee Transfer Management System
this.jtxtAdminID.setText(" ");
this.jtxtAdminName.setText(" ");
this.jcboDepartment.setSelectedIndex(-1);
this.jcboRole.setSelectedIndex(-1);
this.jtxtCurrentProject.setText(" ");
this.jtxtCurrentLocation.setText(" ");
this.jtxtTranserProject.setText(" ");
this.jtxtTransferLocation.setText(" ");
this.jtxtWorExperience.setText(" ");
105
Employee Transfer Management System
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
// new EmployeeTransferRequest().setVisible(true);
}
});
}
106
Employee Transfer Management System
107
Employee Transfer Management System
/*
* EmployeeTransferSearch.java
*
* Created on August 28, 2009, 10:27 AM
*/
package Employee;
import java.sql.*;
import java.util.Date;
import javax.swing.*;
/**
*
* @author user
*/
public class EmployeeTransferSearch extends javax.swing.JFrame {
JOptionPane pane;
Statement stmt;
Connection con;
ResultSet rs;
Date date;
108
Employee Transfer Management System
String name;
public EmployeeTransferSearch(String n) {
name=n;
date=new Date();
Connection();
initComponents();
}
void Connection()
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(ClassNotFoundException es)
{
pane.showMessageDialog(this,"Class Not
Found"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
try
{
String str="Jdbc:Odbc:Employee";
con=DriverManager.getConnection(str);
this.stmt=con.createStatement();
}
catch(SQLException es)
{
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
109
Employee Transfer Management System
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowOpened(java.awt.event.WindowEvent evt) {
formWindowOpened(evt);
}
});
110
Employee Transfer Management System
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.add(jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
710, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(41, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel2,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 48, Short.MAX_VALUE)
);
111
Employee Transfer Management System
jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 1019, Short.MAX_VALUE)
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 15, Short.MAX_VALUE)
);
112
Employee Transfer Management System
jcboEmployeeIDActionPerformed(evt);
}
});
jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel4Layout.createSequentialGroup()
.addContainerGap()
113
Employee Transfer Management System
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG)
.add(jPanel4Layout.createSequentialGroup()
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILI
NG)
.add(jcboEmployeeID, 0, 120, Short.MAX_VALUE)
.add(jLabel21,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 120,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(31, 31, 31)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILI
NG)
.add(jLabel22,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jcboEmpName, 0, 133, Short.MAX_VALUE))
.add(41, 41, 41)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG)
.add(jLabel23,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 133,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jcboLocation,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 125,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(23, 23, 23)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILI
NG)
.add(jLabel24,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 115,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jcboToLocation,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 126,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(19, 19, 19)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG)
.add(jLabel25,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 153,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jcboFromDep,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 140,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
114
Employee Transfer Management System
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG, false)
.add(jcboToDep, 0,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jLabel26,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE))
.add(56, 56, 56))
.add(org.jdesktop.layout.GroupLayout.TRAILING,
jPanel4Layout.createSequentialGroup()
.add(jLabel20,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 537,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(177, 177, 177))))
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel4Layout.createSequentialGroup()
.add(jLabel20)
.add(11, 11, 11)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASEL
INE)
.add(jLabel23)
.add(jLabel24)
.add(jLabel21)
.add(jLabel25)
.add(jLabel22)
.add(jLabel26))
.add(20, 20, 20)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASEL
INE)
.add(jcboEmployeeID,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 33,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jcboEmpName,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jcboToLocation,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jcboFromDep,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
115
Employee Transfer Management System
.add(jcboLocation,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jcboToDep,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addContainerGap(12, Short.MAX_VALUE))
);
116
Employee Transfer Management System
}
});
jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel5Layout.createSequentialGroup()
.add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG)
.add(jPanel5Layout.createSequentialGroup()
.add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG, false)
.add(jPanel5Layout.createSequentialGroup()
.add(43, 43, 43)
.add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG)
.add(jPanel5Layout.createSequentialGroup()
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jLabel9,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 133,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(jLabel11,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 133,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(33, 33, 33))
.add(org.jdesktop.layout.GroupLayout.TRAILING,
jPanel5Layout.createSequentialGroup()
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG)
.add(jLabel10,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 133,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel16))
.add(21, 21, 21)))
.add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG)
117
Employee Transfer Management System
.add(jlstName,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 207, Short.MAX_VALUE)
.add(jlstID, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
207, Short.MAX_VALUE)
.add(jlstCDepartment,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 207, Short.MAX_VALUE)
.add(jlststCLoaction,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 207, Short.MAX_VALUE))
.add(39, 39, 39)
.add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILI
NG, false)
.add(jPanel5Layout.createSequentialGroup()
.add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILI
NG, false)
.add(jLabel28,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jLabel27,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jLabel15,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.add(34, 34, 34)
.add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILI
NG)
.add(jlstTDepartment,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 207,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jlstTDate,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 207,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jlstJDate,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 207,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(jPanel5Layout.createSequentialGroup()
.add(jLabel30)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jlstCLoaction,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 207,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG)
.add(jPanel5Layout.createSequentialGroup()
118
Employee Transfer Management System
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jButton3))))
.add(list9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 207,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel5Layout.createSequentialGroup()
.add(28, 28, 28)
.add(jLabel15)
.add(62, 62, 62)
.add(jLabel27)
.add(71, 71, 71)
.add(jLabel28)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 64,
Short.MAX_VALUE)
.add(jLabel30)
.add(31, 31, 31))
.add(jPanel5Layout.createSequentialGroup()
.add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILI
NG)
.add(org.jdesktop.layout.GroupLayout.LEADING,
jPanel5Layout.createSequentialGroup()
.add(list9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 0,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(28, 28, 28)
.add(jButton4))
.add(org.jdesktop.layout.GroupLayout.LEADING,
jPanel5Layout.createSequentialGroup()
.add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG)
.add(jPanel5Layout.createSequentialGroup()
.addContainerGap()
.add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG)
.add(jlstTDepartment,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 60,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
119
Employee Transfer Management System
.add(jlstID,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 60,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(jPanel5Layout.createSequentialGroup()
.add(29, 29, 29)
.add(jLabel9)))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG)
.add(jPanel5Layout.createSequentialGroup()
.add(45, 45, 45)
.add(jLabel10))
.add(jPanel5Layout.createSequentialGroup()
.add(20, 20, 20)
.add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG, false)
.add(jlstTDate, 0, 0, Short.MAX_VALUE)
.add(jlstName,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 70,
Short.MAX_VALUE))))))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG)
.add(jPanel5Layout.createSequentialGroup()
.add(46, 46, 46)
.add(jLabel11))
.add(jPanel5Layout.createSequentialGroup()
.add(20, 20, 20)
.add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG)
.add(jlstJDate, 0, 0, Short.MAX_VALUE)
.add(jlststCLoaction,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 70,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG)
.add(org.jdesktop.layout.GroupLayout.TRAILING,
jPanel5Layout.createSequentialGroup()
.add(jLabel16)
.add(26, 26, 26))
.add(org.jdesktop.layout.GroupLayout.TRAILING,
jPanel5Layout.createSequentialGroup()
120
Employee Transfer Management System
.add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILI
NG)
.add(jlstCLoaction,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 60,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jlstCDepartment,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 70,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jButton3))
.addContainerGap())))
);
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(jPanel5,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING,
false)
.add(org.jdesktop.layout.GroupLayout.LEADING,
layout.createSequentialGroup()
.addContainerGap()
.add(jLabel3,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 94,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(29, 29, 29)
.add(jPanel1,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING,
false)
.add(layout.createSequentialGroup()
121
Employee Transfer Management System
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jlblName,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 95,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(14, 14, 14)
.add(jlblTime,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.add(layout.createSequentialGroup()
.add(154, 154, 154)
.add(jLabel6,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 515,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jLabel18,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 130,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jLabel4,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 76,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(org.jdesktop.layout.GroupLayout.LEADING,
layout.createSequentialGroup()
.add(10, 10, 10)
.add(jPanel4,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
122
Employee Transfer Management System
.add(layout.createSequentialGroup()
.add(21, 21, 21)
.add(jLabel3,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 111,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jLabel4,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 111,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(layout.createSequentialGroup()
.add(jPanel1,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(14, 14, 14)
.add(jLabel6,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 23,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(18, 18, 18)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel8,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 22,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jlblName,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 22,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jlblTime,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 25,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(layout.createSequentialGroup()
.add(22, 22, 22)
.add(jLabel17)))
.add(jLabel18))))))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(15, 15, 15)
123
Employee Transfer Management System
.add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
342, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(72, 72, 72))
);
pack();
}// </editor-fold>
cnt++;
}while(rs.next());
}
else
{
124
Employee Transfer Management System
pane.showMessageDialog(this,"Record Not
Found","Error",pane.ERROR_MESSAGE);
}
}
catch(SQLException es) {
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
}
cnt++;
}while(rs.next());
}
else
{
125
Employee Transfer Management System
pane.showMessageDialog(this,"Record Not
Found","Error",pane.ERROR_MESSAGE);
}
}
catch(SQLException es) {
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
}
cnt++;
}while(rs.next());
}
else
{
126
Employee Transfer Management System
pane.showMessageDialog(this,"Record Not
Found","Error",pane.ERROR_MESSAGE);
}
}
catch(SQLException es) {
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
}
cnt++;
}while(rs.next());
}
else
{
127
Employee Transfer Management System
pane.showMessageDialog(this,"Record Not
Found","Error",pane.ERROR_MESSAGE);
}
}
catch(SQLException es) {
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
}
cnt++;
}while(rs.next());
}
else
{
128
Employee Transfer Management System
pane.showMessageDialog(this,"Record Not
Found","Error",pane.ERROR_MESSAGE);
}
}
catch(SQLException es) {
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
}
cnt++;
}while(rs.next());
}
else
{
129
Employee Transfer Management System
pane.showMessageDialog(this,"Record Not
Found","Error",pane.ERROR_MESSAGE);
}
}
catch(SQLException es) {
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
}
cnt++;
}while(rs.next());
}
else
{
pane.showMessageDialog(this,"Record Not
Found","ERROR",pane.ERROR_MESSAGE);
}
}catch(SQLException es) {
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
130
Employee Transfer Management System
try
{
String str="select distinct EmployeeName from EmployeeTransferDetails";
rs=this.stmt.executeQuery(str);
if(rs.next())
{
int cnt=0;
do
{
this.jcboEmpName.insertItemAt(rs.getString(1),cnt);
cnt++;
}while(rs.next());
}
else
{
pane.showMessageDialog(this,"Record Not
Found","ERROR",pane.ERROR_MESSAGE);
}
}catch(SQLException es) {
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
try
{
String str="select distinct CurrentLocation from EmployeeTransferDetails";
rs=this.stmt.executeQuery(str);
if(rs.next())
{
int cnt=0;
do
{
this.jcboLocation.insertItemAt(rs.getString(1),cnt);
cnt++;
}while(rs.next());
}
else
{
pane.showMessageDialog(this,"Record Not
Found","ERROR",pane.ERROR_MESSAGE);
}
}catch(SQLException es) {
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
131
Employee Transfer Management System
}
try
{
String str="select distinct TransferLocation from EmployeeTransferDetails";
rs=this.stmt.executeQuery(str);
if(rs.next())
{
int cnt=0;
do
{
this.jcboToLocation.insertItemAt(rs.getString(1),cnt);
cnt++;
}while(rs.next());
}
else
{
pane.showMessageDialog(this,"Record Not
Found","ERROR",pane.ERROR_MESSAGE);
}
}catch(SQLException es) {
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
try
{
String str="select distinct CurrentDepartment from
EmployeeTransferDetails";
rs=this.stmt.executeQuery(str);
if(rs.next())
{
int cnt=0;
do
{
this.jcboFromDep.insertItemAt(rs.getString(1),cnt);
cnt++;
}while(rs.next());
}
else
{
pane.showMessageDialog(this,"Record Not
Found","ERROR",pane.ERROR_MESSAGE);
}
}catch(SQLException es) {
132
Employee Transfer Management System
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
try
{
String str="select distinct TransferDepartment from
EmployeeTransferDetails";
rs=this.stmt.executeQuery(str);
if(rs.next())
{
int cnt=0;
do
{
this.jcboToDep.insertItemAt(rs.getString(1),cnt);
cnt++;
}while(rs.next());
}
else
{
pane.showMessageDialog(this,"Record Not
Found","ERROR",pane.ERROR_MESSAGE);
}
}catch(SQLException es) {
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
// new EmployeeTransferSearch().setVisible(true);
}
});
}
133
Employee Transfer Management System
134
Employee Transfer Management System
/*
* NewEmployeeDetails.java
*
* Created on August 26, 2009, 1:52 PM
*/
package Employee;
import java.sql.*;
import java.util.Date;
import javax.swing.*;
/**
*
* @author user
*/
public class NewEmployeeDetails extends javax.swing.JFrame {
JOptionPane pane;
Statement stmt;
Connection con;
ResultSet rs;
135
Employee Transfer Management System
Date date;
public NewEmployeeDetails() {
date=new Date();
Connection();
initComponents();
}
void Connection()
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(ClassNotFoundException es)
{
pane.showMessageDialog(this,"Class Not
Found"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
try
{
String str="Jdbc:Odbc:Employee";
con=DriverManager.getConnection(str);
this.stmt=con.createStatement();
}
catch(SQLException es)
{
pane.showMessageDialog(this,"SQL
Error"+es.toString(),"Error",pane.ERROR_MESSAGE);
}
136
Employee Transfer Management System
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowOpened(java.awt.event.WindowEvent evt) {
formWindowOpened(evt);
}
});
137
Employee Transfer Management System
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING,
jPanel1Layout.createSequentialGroup()
.add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
663, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(19, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel1,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 48, Short.MAX_VALUE)
);
138
Employee Transfer Management System
jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel5Layout.createSequentialGroup()
.add(47, 47, 47)
.add(jLabel15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
399, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(56, Short.MAX_VALUE))
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING,
jPanel5Layout.createSequentialGroup()
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.add(jLabel15)
.addContainerGap())
);
jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 994, Short.MAX_VALUE)
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 15, Short.MAX_VALUE)
);
139
Employee Transfer Management System
jLabel5.setText("Employee Name");
140
Employee Transfer Management System
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
jtxtRetype.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
jtxtRetypeFocusLost(evt);
}
});
jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel4Layout.createSequentialGroup()
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG)
.add(jPanel4Layout.createSequentialGroup()
.add(23, 23, 23)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILI
NG)
.add(jPanel4Layout.createSequentialGroup()
.add(jLabel5,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE)
.add(16, 16, 16)
.add(jtxtAdminName,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 182,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(org.jdesktop.layout.GroupLayout.LEADING,
jPanel4Layout.createSequentialGroup()
.add(jLabel10)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED,
41, Short.MAX_VALUE)
.add(jtxtRetype,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 181,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(jPanel4Layout.createSequentialGroup()
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG)
.add(jLabel7)
.add(jLabel8))
.add(19, 19, 19)
141
Employee Transfer Management System
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILI
NG)
.add(jtxtAdminID,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 180, Short.MAX_VALUE)
.add(jtxtPassword,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 180,
Short.MAX_VALUE)))))
.add(jPanel4Layout.createSequentialGroup()
.add(59, 59, 59)
.add(jLabel9,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 224,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(jPanel4Layout.createSequentialGroup()
.add(75, 75, 75)
.add(jLabel6,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 214,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)))
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG)
.add(jPanel4Layout.createSequentialGroup()
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 51,
Short.MAX_VALUE)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILI
NG, false)
.add(jLabel14,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jLabel13,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jLabel12,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jLabel11,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.add(29, 29, 29)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jtxtAddress,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 169,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
142
Employee Transfer Management System
.add(org.jdesktop.layout.GroupLayout.TRAILING, jtxtCity,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 169,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jtxtPhoneNo,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 169,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jtxtEmail,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 169,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(jPanel4Layout.createSequentialGroup()
.add(14, 14, 14)
.add(jButton1,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 126,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jButton2,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 7,
Short.MAX_VALUE)
.add(jButton3,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 71,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(42, 42, 42))
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel4Layout.createSequentialGroup()
.add(23, 23, 23)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASEL
INE)
.add(jtxtAddress,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel11)
.add(jLabel5)
.add(jtxtAdminName,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADI
NG, false)
.add(jPanel4Layout.createSequentialGroup()
.add(16, 16, 16)
.add(jLabel6)
.add(18, 18, 18)
143
Employee Transfer Management System
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILI
NG)
.add(jLabel7)
.add(jtxtAdminID,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(46, 46, 46)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASEL
INE)
.add(jLabel8)
.add(jtxtPassword,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(19, 19, 19)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASEL
INE)
.add(jLabel9)
.add(jLabel14)))
.add(jPanel4Layout.createSequentialGroup()
.add(29, 29, 29)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASEL
INE)
.add(jtxtCity,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel12))
.add(34, 34, 34)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASEL
INE)
.add(jtxtPhoneNo,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel13))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jtxtEmail,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILI
NG)
.add(jPanel4Layout.createSequentialGroup()
.add(23, 23, 23)
144
Employee Transfer Management System
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASEL
INE)
.add(jLabel10)
.add(jtxtRetype,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addContainerGap(22, Short.MAX_VALUE))
.add(jPanel4Layout.createSequentialGroup()
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASEL
INE)
.add(jButton1)
.add(jButton2)
.add(jButton3))
.addContainerGap())))
);
jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 994, Short.MAX_VALUE)
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 15, Short.MAX_VALUE)
);
145
Employee Transfer Management System
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(jPanel1,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 35,
Short.MAX_VALUE))
.add(layout.createSequentialGroup()
.add(jLabel16,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 123,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
146
Employee Transfer Management System
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(35, 35, 35)
.add(jlblTime,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 373,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(layout.createSequentialGroup()
.add(49, 49, 49)
.add(jLabel4,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 334,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 65,
Short.MAX_VALUE)
.add(jLabel17,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 123,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(21, 21, 21)))
.add(13, 13, 13)
.add(jLabel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 94,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(26, 26, 26))
.add(layout.createSequentialGroup()
.add(20, 20, 20)
.add(jLabel18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
123, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(70, 70, 70)
.add(jPanel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(58, 58, 58)
.add(jButton4)
.addContainerGap(154, Short.MAX_VALUE))
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jPanel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jLabel21, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
84, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel22, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
84, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel23, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
84, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(22, 22, 22)
147
Employee Transfer Management System
.add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(13, 13, 13)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jLabel24, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
84, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel25, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
84, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(layout.createSequentialGroup()
.add(10, 10, 10)
.add(jLabel26,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 84,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(17, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(29, 29, 29)
.add(jLabel2,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 111,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(layout.createSequentialGroup()
.addContainerGap()
.add(jPanel1,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(17, 17, 17)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jLabel17)
.add(layout.createSequentialGroup()
.add(jLabel4)
.add(22, 22, 22)
.add(jlblTime,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 33,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(jLabel16)))
.add(layout.createSequentialGroup()
.add(19, 19, 19)
.add(jLabel3,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 111,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
148
Employee Transfer Management System
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(24, 24, 24)
.add(jLabel18))
.add(layout.createSequentialGroup()
.add(10, 10, 10)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(jButton4)
.add(jPanel5,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel4,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(layout.createSequentialGroup()
.add(33, 33, 33)
.add(jLabel21,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(14, 14, 14)
.add(jLabel22,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jLabel23,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
.add(layout.createSequentialGroup()
.add(108, 108, 108)
.add(jLabel24,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
149
Employee Transfer Management System
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jLabel25,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jLabel26,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 33,
Short.MAX_VALUE)
.add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
);
pack();
}// </editor-fold>
150
Employee Transfer Management System
this.jtxtPassword.setText(" ");
this.jtxtPhoneNo.setText(" ");
this.jtxtRetype.setText(" ");
this.jtxtEmail.setText(" ");
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewEmployeeDetails().setVisible(true);
}
});
}
151
Employee Transfer Management System
152
Employee Transfer Management System
10. TESTING
Software Testing
meets the business and technical requirements that guided its design
and development;
works as expected; and
can be implemented with the same characteristics.
Testing methods
Software testing methods are traditionally divided into black box testing
and white box testing. These two approaches are used to describe the point of view
that a test engineer takes when designing test cases.
153
Employee Transfer Management System
Specification-based testing:
The black box tester has no "bonds" with the code, and a tester's perception
is very simple: a code must have bugs. Using the principle, "Ask and you shall
receive," black box testers find bugs where programmers do not. But, on the other
hand, black box testing has been said to be "like a walk in a dark labyrinth without
a flashlight," because the tester doesn't know how the software being tested was
actually constructed. As a result, there are situations when (1) a tester writes many
test cases to check something that could have been tested by only one test case,
and/or (2) some parts of the back-end are not tested at all.
Therefore, black box testing has the advantage of "an unaffiliated opinion,"
on the one hand, and the disadvantage of "blind exploring," on the other.
White box testing is when the tester has access to the internal data
structures and algorithms including the code that implement these.
154
Employee Transfer Management System
Test planning: Test strategy, test plan, tested creation. Since many
activities will be carried out during testing, a plan is needed.
Test execution: Testers execute the software based on the plans and
tests and report any errors found to the development team.
155
Employee Transfer Management System
Test Closure: Once the test meets the exit criteria, the activities such as
capturing the key outputs, lessons learned, results, logs, documents
related to the project are archived and used as a reference for future
projects.
156
Employee Transfer Management System
157
Employee Transfer Management System
158
Employee Transfer Management System
159
Employee Transfer Management System
A key difference between System Implementation and all other phases of the
lifecycle is that all project activities up to this point have been performed in safe,
protected, and secure environments, where project issues that arise have little or no
impact on day-to-day business operations. Once the system goes live, however,
this is no longer the case. Any miscues at this point will almost certainly translate
into direct operational and/or financial impacts on the Performing Organization. It
is through the careful planning, execution, and management of System
Implementation activities that the Project Team can minimize the likelihood of
these occurrences, and determine appropriate contingency plans in the event of a
problem.
Design Standards
Developments Standards
Documentation Standards
160
Employee Transfer Management System
161
Employee Transfer Management System
Before the future enhancements we need to have back up of the system and
its log files so that if in future system crashes then the system be replaced and
corrected this way we can have system maintained as it is.
Types of maintenance
Adaptive
Corrective
Preventive
Predictive
162
Employee Transfer Management System
This project is developed for single user. Only single user can use the
software i.e. the system is standalone and don’t have network support. So, that the
database is decentralized which result, the high data redundancy, have complex i.e.
a form, he/she cannot open another form. First he has to complete his work on the
current form and then he can switch to another form. This project is made for only
In this project all information about Employee Transfer Management System is not
consider.
163
Employee Transfer Management System
This project can be developed for online services, by which any employee
can see its details anytime-anywhere.
This project can be developed with centralized database so that data storage
and backup services will be easy.
164
Employee Transfer Management System
BIBLIOGRAPHY
Books:
E.Balagurusamy, “Programming with Java: A Primer”, 4 th Edition,
McGrawHill Publication, 2010.
Herbert Schildt, “The Complete Reference Java2”, 5 th Edition,
McGrawHill Publication, 2002.
Gail Anderson and Paul Anderson, “Java Studio Creator Field
Guide”, 2nd Edition, Prentice-Hall, Inc., 2004.
Elias M. Awad, “Systems Analysis and Design”, 2 nd Edition, Galgotia
Publication, 2008.
Petkovi, “Microsoft Sql Server 2005: A Beginner’s Guide”, Tata McGraw-
Hill, 2006
IGNOU, “CS-05 Elements of System Analysis and Design”.
IGNOU, “CS-67 RDBMS LAB Book 1”.
IGNOU, “CS-70 Introduction to Software Engineering”.
IGNOU, “CS-74 Introduction to Internet Programming”.
Websites:
http://javalessons.com/
http://http://javabeginner.com/
http://netbeans.org/kb/articles/learn-java.html
http://www.roseindia.net/
165