Sie sind auf Seite 1von 217

Project Report

Job Placement Agency

PAGE NO. 1. Introduction 2. Objective . 3. Tools/Environment Used. 4. Analysis Document SRS (Software Requirement Specification). DFD ( Data flow Diagram) ER-Diagram. Data Dictionary. 5. Design Document Modularization Detail Data Integrity & Constraint Procedural Design User Interface Design 6. Program Code 7. System Testing 8. Input & output Screens 9. System Security 10. Limitation of project 11. Future Application of the project 12. Bibliography 3 5 7 9-21 9-10 11-15 16-19 20-21 23-31 24 24-25 25-26 26-31 33-194 196-198 200-210 212 214 216 217

Project Report

Job Placement Agency

INTRODUCTION

Project Report

Job Placement Agency

INTRODUCTION
DEFINATION
Job Placement Agency is an agency that finds jobs for people seeking them and finds people to fill particular jobs.

Computer is man made machine which faithfully follows man given orders and shortly gives man wanted result. The innovation of computers has drastically effected the organization of all kinds, whether it is large or small. I have chosen this project on Adecco Job Placement Agency for general purpose of agency. It will not contain all the functioning of agency but only the general functioning of agency. I have to prepare this project because it is an immediate requirement of todays time. This software is capable of handling all the work related to Job Placement Agency. In present it is develop for a particular Agency but in future it can be used by any other Job Placement Agency to handle the related job. The software is designed based on usual working of an Organization. It is flexible in a sense that it can be modified keeping in mind functional operations for a specific Organization.

Project Report

Job Placement Agency

OBJECTIVE

Project Report

Job Placement Agency

OBJECTIVES
The main task of this project is storing information about Candidate who wants the Job according to their qualification, and maintaining data in computer and for saving our time from time consuming works. The main objectives for developing this project are given below: Provide quick service to agency staff. Reduced paper work due to which reduced man power. Reduced operational time. Increased accuracy. Increased reliability. Data Security

Project Report

Job Placement Agency

Tools/Environment Used

Project Report

Job Placement Agency

Tools/Environment Used
Hardware

C.P.U Mother Board RAM Monitor HDD :

: Asus : : :

Dual core (2.9 GHz) 256MB. 15 Monitor with Best Resolution 800 by 600 Pixels 80 GB

Software

Operating System Front-End Back-End :

: :

Windows XP. Java (JDK1.5.0) RDBMS (Oracle 9i)

Project Report

Job Placement Agency

SYSTEM ANALYSIS

Project Report

Job Placement Agency

ANALYSIS
The principal objective of the systems-analysis phase is the specification of what the system needs to do to meet the requirements of end users. In the systems-design phase such specifications are converted to a hierarchy of charts that define the data required and the processes to be carried out on the data so that they can be expressed as instructions of a computer program. Many information systems are implemented with generic software, rather than with such custom-built programs. We design any software by using some method. These are:[I]: SRS [II]: DFD [III]: ER-Diagram [IV]: Data Dictionary

[I]: SRS (SOFTWARE REQUIREMENT ANALYSIS):


Requirements analysis in System Engineering and Software Engineering encompasses those tasks that go into determining the needs or conditions to meet for a new or altered product, taking account of the possibly conflicting requirement of the various stakeholders, such as beneficiaries or users. Requirements analysis is critical to the success of a development project. Requirement must be documented, actionable, measurable, testable, related to identified business needs or opportunities, and defined to a level of detail sufficient for system design. Requirements can be architectural, structural, behavioral, functional, and non-functional. The SRS outline is given below: 1. Introduction. Purpose. Scope.

Project Report Definition, acronyms, and abbreviation. Reference. Overview. 2. Overall Description. Product perspective. Product Function. User characteristics. Constraints. Assumption and dependencies. 3. Specific Requirement. External Interfaces. Functional requirements. Performance requirements. Logical Database requirements. Design Constraints. Software system attributes. Organizing the specific requirement. Additional Comment. 4. Supporting Information. Table of Contents and Index. Appendixes.

Job Placement Agency

10

Project Report

Job Placement Agency

[II]: DFD (DATA FLOW DIAGRAM):DFD stands for Data Flow Diagram developed by LARRY CONSTANTINE. DFD is a graphical description of Systems data & shows how the processes transform the data. DFD Symbol: There are Some Symbols which are used to construct the DFD. These Symbols are given below: Arrows:An arrow identifies data flow- data in motion. It is a pipeline through which information flows. Circles :-

Circles stand for a Open-ended boxes:-

process that converts data into information.

An open ended box represents a data / store data or a temporary repository of data. Squares:A square defines a source or destination of system data.

11

Project Report

Job Placement Agency

Construction of DFD:-

DFD for Job Placement Agency

Staff

Source

Adecco Job Placement Agency

Candidate

Report

Vacancy

12

Project Report

Job Placement Agency

DFD on Staff

Staff

Staff Detail

Adecco
Send Receipt

Job profile

Job Placement Salary Agency

Work Place

Report Generatio n

13

Project Report

Job Placement Agency

DFD on Candidate

Candidat e

Adecco Job Placement Agency Reject

Candidate Detail

Registration Information

Interviewin g Process Phase Accept Registered

14

Project Report

Job Placement Agency

DFD on Vacancy

Vacancy

Adecco Job Placement Agency Reject Vacancy Detail

Investigation

Accept Save

15

Project Report [III]: ER-Diagram:-

Job Placement Agency

It stands for Entity Relationship Diagram developed by PETER CHEN. ER-Model is Object based logical model. Before making E-R diagram we comprise three things: Entity/Entity set Relationship/Relationship set Attributes It can be anything that has certain physical existence in the real world and entity set is a collection of similar types of entity. Various entity sets are: JPA Staff Candidate Vacancy Source Registration Report Relationship: It is an association among several entities. RELATIONSHIP BETWEEN Staff AND JPA The relationship between Staff and JPA is many to one.

Entity/Entity set:-

M Staff

Works in

1 JPA

16

Project Report

Job Placement Agency

RELATIONSHIP BETWEEN JPA AND Candidate The relationship between JPA and Candidate is one to many. 1 JPA M Candidate

Has

RELATIONSHIP BETWEEN JPA AND Report The relationship between JPA and Candidate is one to many. 1 JPA M Report

Generate

RELATIONSHIP BETWEEN JPA AND Vacancy The relationship between JPA and Vacancy is one to many. 1 JPA M Vacancy

Has

RELATIONSHIP BETWEEN JPA AND Source The relationship between JPA and Source is one to many. 1 JPA
Has

M Source

RELATIONSHIP BETWEEN Staff AND Candidate The relationship between Staff and Candidate is many to many. M Staff
Provide Job to

Candidate

17

Project Report

Job Placement Agency

RELATIONSHIP BETWEEN Staff AND Vacancy The relationship between Staff and Vacancy is many to many. M Staff
Collect

N Vacancy

RELATIONSHIP BETWEEN Staff AND Registration The relationship between Staff and Registration is many to many. M Staff
Maintai ns

N
Registration

RELATIONSHIP BETWEEN Source AND Vacancy The relationship between Source and Vacancy is many to many. M Source Has N Vacancy

RELATIONSHIP BETWEEN Candidate AND Registration The relationship between Candidate and Registration is one to one. 1 Candidate
Registere d with

1
Registration

18

Project Report

Job Placement Agency ER-diagram on adecco job placement agency


S_Qualificatio n S_DOJ S_Nam e Total_Fee C_Nam e
i Mainta ns
Provid e Job to
o W s rk n i

S_Salar y
S_Ad d.
S_id

S_Ph.N o.

Colle ct V_Salary
a H

Owne r

JPA

JPA_Name

Genera te
s Ha
s

V_i d

C_id V_Nam e Report

Date

TieUp Callin g
Source

Co_id

Vacancy Status Require d Gender Require d post Co_Name Co_Add Ha s

C_Nam e

Co_Add

.
Co_Ph.N o.

19

C_Qualificatio n

S_Designation Staff JPA_i d


as H

Due_Fe e
C_id

Paid_Fee

Reg_no. Registration

Registere d with Candidate

C_DOB

.
C_Ad d.
C_id

C_Ph.N

C_Nam e

o.

Co_Name

Project Report

Job Placement Agency

DATA DICTIONARY:
It is the structured repository of data about data The dictionary contains data about data , sometimes it is called Meta data. It is computer based catalog. A Data Dictionary includes a s/w component to manage a Database of data definition , that is metadata about the Structure, data element, & other characteristics of an organizations databases. DATA ELEMENTS: The smallest unit of data which are not divided in the small parts. Eg:DATE consist of Day, Month, &Year. DATA STRUCTURE: A group of data elements. DATA FLOWS AND STORES: Data flows &data stores in motion, where as data store is a location where data structure are temporarily located. TYPES OF DATA DICTIONARY: There are two types of Data Dictionary:[1] Integrated DD:Tied to only one DBMS [2] Standard DD:Not tied to only one DBMS

Both Data Dictionary are of two types:-

20

Project Report (1)Active DD (2)Passive DD

Job Placement Agency

If a DD is used only by designers, users & administrators, by the DBMS, It is called a passive DD, otherwise Active DD. MAJOR SYMBOLS: = + [] () : : : : Equivelent to And Either |or Optional Entry

21

Project Report

Job Placement Agency

DESIGN DOCUMENT

22

Project Report

Job Placement Agency

SYSTEM DESIGN
Introduction:
System design provides the understandings and procedural details necessary for implementing the system recommended in the system study. Emphasis is on the translating the performance requirements into design specifications. The design phase is a transition from a user-oriented document (System proposal) to a document oriented to the programmers or database personnel. System design goes through two phases of development: [1]: [2]: Logical Design Physical Design

Logical and Output Design:


The logical design of an information system is analogous to an engineering blue print of an automobile. It shows the major features and how they are related to one another. The detailed specification for the new system was drawn on the bases of users requirement data. The outputs inputs and databases are designed in this phase. Output design is one of the most important features of the information system. When the output is not of good quality the users will be averse to use the newly designed system and may not use the system. There are many types of output, all of which can be either highly useful or can be critical to the users, depending on the manner and degree to which they are used.

Input Design:
The input design is the link that ties the information system into the users world. Input specifications describe the manner in which data enters the system for processing.

23

Project Report

Job Placement Agency

Input design features can ensure the reliability of the system and produce results from accurate data, or they can result in the production of erroneous information.

MODULARIZATION DETAIL

In System Engineering, modular design or "modularity in design" is an approach that subdivides a system into smaller parts (modules) that can be independently created and then used in different systems to drive multiple functionalities. A modular system can be characterized by the following: [1]: Functional partitioning into discrete scalable, reusable modules consisting of isolated, self-contained functional elements. [2]: Rigorous use of well-defined modular interfaces, including object-oriented descriptions of module functionality. [3]: Ease of change to achieve technology transparency and, to the extent possible, make use of industry standards for key interfaces. A computer is actually one of the best examples of modular design - typical modules are power supply unit (Computer)s, processor, main board, graphics card, hard drives, optical drives, etc. All of these parts should be easily interchangeable, as long as you use parts that support the same standard interface as the part you replaced.

DATA INTEGRITY & CONSTRAINTS


Data integrity allows defining certain data quality requirements that the data in the database needs to meet. If a user tries to insert data that doesn't meet these requirements, Oracle will not allow so

Restriction of Constraints:
There is some restriction of Integrity constraints. Which are given below:-

24

Project Report Completeness Consistency Corretness

Job Placement Agency

Types of Integrity Constraints:


There are three types of Integrity Constraints, which are given below: Entity Integrity Referential Integrity Domain Integrity

Entity Integrity:
States that primary key cant be null.

Referential Integrity:
States that both Primary key or Foreign key must have same data type, same width, & same value.

Domain Integrity:
Set of legal values are specified by check constraints.

PROCEDURAL DESIGN
After data & program structure have been established, becomes necessary to specify procedural detail without ambiguity. DESIGN NOTAIN: Structured Programming. Graphical design Notation. Tabular design Notation.

25

Project Report Program design Language.

Job Placement Agency

USER INTERFACE DESIGN


User interface design or user interface engineering is the design of computer, appliances, machines, mobile communication software, software applications, and websites with the focus on the users experience and interaction. The goal of user interface design is to make the user's interaction as simple and efficient as possible, in terms of accomplishing user goalswhat is often called user-centered design. Good user interface design facilitates finishing the task at hand without drawing unnecessary attention to itself. Graphics design may be utilized to support its usability. The design process must balance technical functionality and visual elements (e.g., mental model) to create a system that is not only operational but also usable and adaptable to changing user needs. Interface design is involved in a wide range of projects from computer systems, to cars, to commercial planes; all of these projects involve much of the same basic human interactions yet also require some unique skills and knowledge. As a result, designers tend to specialize in certain types of projects and have skills centered around their expertise, whether that be software design, user research, web design, or industrial design. USER ANALYSIS: analysis of the potential users of the system either through discussion with people who work with the users and/or the potential users themselves. Typical questions involve: What would the user want the system to do? How would the system fit in with the user's normal workflow or daily activities? How technically savvy is the user and what similar systems does the user already use? What interface look & feel styles appeal to the user?

26

Project Report

Job Placement Agency

GRAPHICAL INTERFACE DESIGN : actual look & feel design of the final Graphical User Interface (GUI). It may be based on the findings developed during the usability testing if usability is unpredictable, or based on communication objectives and styles that would appeal to the user. In rare cases, the graphics may drive the prototyping, depending on the importance of visual form versus function. If the interface requires multiple skins, there may be multiple interface designs for one control panel, functional feature or widget. This phase is often a collaborative effort between a graphical designer and a user interface designer, or handled by one who is proficient in both disciplines. User interface design requires a good understanding of user needs.

COMPLETE STRUCTURE:
NUMBER OF MODULES: 1. JPA module:
This module contains all the information about Agency. With the help of This module we can insert, delete, update and retrieve the information about Agency.

2. Staff module:
This module contains all the information about Staff. With the help of this module we can insert, delete, update and retrieve the information about Staff.

3. Candidate module:
This module contains all the information about Candidate. With the help of this module we can insert, delete, update and retrieve the information about Candidate.

27

Project Report

Job Placement Agency

4. Vacancy module:
This module contains all the information about Vacancy. With the help of this module we can insert, delete, update and retrieve the information about Vacancy.

5. Source module:
This module contains all the information about Source. With the help of this module we can insert, delete, update and retrieve the information about Source.

6. Registration module:
This module contains all the information about Registration. With the help of this module we can insert, delete, update and retrieve the information about registration.

7. Report module:
This module contains all the information about Report generated by the agency. We can insert, delete, update, and retrieve the information about Report.

DATA STRUCTURE: 1. Table about JPA: SN


1 2 3

ATTRIBUTES
JPA_id JPA_Name Owner

DATA TYPE
NUMBER VARCHAR2 VARCHAR2

CONSTRAINTS
PRIMARY KEY NOT NULL NOT NULL

28

Project Report

Job Placement Agency

2. Table about Staff: SN


1 2 3 4 5 6 7 8

ATTRIBUTES
S_id S_Name S_add S_Ph.No. S_Salary S_DOJ S_Qualification S_Designation

DATA TYPE
NUMBER VARCHAR2 VARCHAR2 NUMBER NUMBER DATE VARCHAR2 VARCHAR2

CONSTRAINTS
PRIMARY KEY NOT NULL NOT NULL ********** NOT NULL NOT NULL NOT NULL NOT NULL

3. Table about Candidate: SN


1 2 3 4 5 6

ATTRIBUTES
C_id C_Name C_add C_Ph.No. C_Qualification C_DOB

DATA TYPE
NUMBER VARCHAR2 VARCHAR2 NUMBER VARCHAR2 DATE

CONSTRAINTS
PRIMARY KEY NOT NULL NOT NULL ********** NOT NULL NOT NULL

29

Project Report

Job Placement Agency

4. Table about Vacancy: SN


1 2 3 4 5 6 7

ATTRIBUTES
V_id V_Name V_Salary Required Gender Required post Co_id Co_Name

DATA TYPE
NUMBER VARCHAR2 VARCHAR2 VARCHAR2 NUMBER NUMBER VARCHAR2

CONSTRAINTS
PRIMARY KEY NOT NULL NOT NULL NOT NULL NOT NULL FOREIGN KEY NOT NULL

5. Table about Source: SN


1 2 3 4

ATTRIBUTES
Co_id Co_Name Co_ph.No. Co_Add

DATA TYPE
NUMBER VARCHAR2 VARCHAR2 VARCHAR2

CONSTRAINTS
PRIMARY KEY NOT NULL NOT NULL NOT NULL

6. Table about Registration: SN


1 2 3 4 5 6

ATTRIBUTES
Reg_No. C_id C_Name Paid Fee Due Fee Total Fee

DATA TYPE NUMBER NUMBER VARCHAR2 NUMBER NUMBER NUMBER

CONSTRAINTS
PRIMARY KEY FOREIGN KEY NOT NULL NOT NULL NOT NULL NOT NULL

7. Table about Report: SN


1 2 3 4

ATTRIBUTES
C_id C_Name Status Date

DATA TYPE NUMBER VARCHAR2 VARCHAR2 DATE

CONSTRAINTS
FOREIGN KEY NOT NULL NOT NULL NOT NULL

30

Project Report

Job Placement Agency

31

Project Report

Job Placement Agency

CODING

32

Project Report

Job Placement Agency

Starting Window:import java.io.*; import java.lang.*; import java.awt.*; import javax.swing.*; import java.awt.event.*; import javax.swing.border.*; public class start extends JDialog implements ActionListener { static loding load; static start frame; Color cl1,cl2; public static void main(String a[]) { frame=new start(); frame.setBounds(350,200,300,300); frame.setVisible(true); frame.setTitle("JOB PLACEMENT AGENCY"); } Container cn; JTextField t1; JButton b1,b2; JLabel l1,l2,msg,mlb; JPasswordField p1; String str1,str2,str11,str22; BevelBorder bbr1; ImageIcon icon1; public start() { //color Defined cl1=new Color(152,150,184); cl2=new Color(197,223,247); //border Defined bbr1=new BevelBorder(BevelBorder.RAISED); //moto dfined icon1=new ImageIcon("Image/amoto1.jpg");

33

Project Report //ContainerDefined cn=getContentPane(); cn.setBackground(cl1); cn.setLayout(null);

Job Placement Agency

//Label Defined msg=new JLabel("Enter User Name & Password",JLabel.CENTER); msg.setBorder(bbr1); msg.setOpaque(true); msg.setBackground(cl2); msg.setBounds(60,20,200,20); cn.add(msg); mlb=new JLabel("",icon1,JLabel.CENTER); mlb.setOpaque(true); mlb.setBounds(5,5,40,40); cn.add(mlb); l1=new JLabel("User"); l1.setBounds(10,80,60,30); cn.add(l1); l2=new JLabel("Password"); l2.setBounds(10,120,60,30); cn.add(l2); //Text field Defined t1=new JTextField(); t1.setBounds(150,80,100,30); cn.add(t1); //Password field Defined p1=new JPasswordField(); p1.setBounds(150,120,100,30); p1.setEchoChar('*'); cn.add(p1); //Button Defined b1=new JButton("Login"); b1.setBounds(55,190,70,30); cn.add(b1); b1.addActionListener(this); b2=new JButton("Exit");

34

Project Report b2.setBounds(145,190,70,30); cn.add(b2); b2.addActionListener(this); str1=""; str2="";

Job Placement Agency

} public void actionPerformed(ActionEvent ae) { str11=t1.getText(); str11=str11.trim(); str22=p1.getText(); if(ae.getSource()==b1) { if(str11.equalsIgnoreCase(str1)==true && str22.equalsIgnoreCase(str2)==true) { frame.dispose(); load=new loding(); load.setBounds(350,200,300,300); load.setVisible(true); load.setTitle("LOADING"); } else { int response=JOptionPane.showConfirmDialog (null,"The user name & password entered is not valid\n"+"want to try again?","Information", JOptionPane. YES_NO_OPTION,JOptionPane. QUESTION_MESSAGE); if(response==0) { t1.setText(""); p1.setText(""); t1.requestFocus(); } else System.exit(0); } } if(ae.getSource()==b2) {

35

Project Report

Job Placement Agency

JOptionPane.showMessageDialog(null,"this will quit your Application","Warning Message",JOptionPane.WARNING_MESSAGE); System.exit(0); } } }

Loding Window:import java.io.*; import java.awt.*; import javax.swing.*; import java.awt.event.*; import javax.swing.border.*; public class loding extends JDialog { static Jps ob; static loding load; JLabel l1,msg,mlb; JProgressBar p; Container cn; Color cl1,cl2; int i; ImageIcon icon1; BevelBorder bbr1; public loding() { //Color Defined cl1=new Color(197,223,247); cl2=new Color(152,150,184); //Container Defined cn=getContentPane(); cn.setBackground(cl1); cn.setLayout(null); //Border Defined bbr1=new BevelBorder(BevelBorder.RAISED);

36

Project Report //Icon Defined icon1=new ImageIcon("Image/amoto1.jpg"); //Label Defined l1=new JLabel("Loading.....",JLabel.CENTER); l1.setBounds(100,100,100,30); cn.add(l1);

Job Placement Agency

msg=new JLabel("ADECCO JOB PLACEMENT AGENCY",JLabel.CENTER); msg.setBorder(bbr1); msg.setOpaque(true); msg.setBackground(cl2); msg.setBounds(60,20,200,20); cn.add(msg); mlb=new JLabel("",icon1,JLabel.CENTER); mlb.setOpaque(true); mlb.setBounds(5,5,40,40); cn.add(mlb); //Progress Bar Defined p=new JProgressBar(); p.setBounds(75,150,150,20); p.setForeground(Color.GREEN); cn.add(p); progress th=new progress(); th.start(); } //Thread class defined for Progressing class progress extends Thread { public void run() { for(i=0;i<=100;i++) { p.setValue(i); try { sleep(10); } catch(Exception ex)

37

Project Report {

Job Placement Agency

System.out.print("ERROR"); } } if(i==101) { start.load.dispose(); Jps ob=new Jps(); ob.setSize(1024,768); ob.setTitle("JOB PLACEMENT AGENCY"); ob.setVisible(true); } } } }

Main Window:import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; class Jps extends JFrame implements ActionListener { JMenuBar mb1; JMenu m1,m2,m3,m4,m5,m6,m7; JMenuItem it1,it2,it3,it4,it5,it6,it7,it8,it9,it10,it11,it12,it13,it14; Color cl1; static int i=0; ImageIcon icon1; JLabel mlb; JDesktopPane dp; //Constructor Of Class public Jps() { dp=new JDesktopPane(); setContentPane(dp); dp.setLayout(null); //Color Defined cl1=new Color(197,223,247);

38

Project Report

Job Placement Agency

//moto dfined icon1=new ImageIcon("Image/moto.jpg"); //Icon Defined mlb=new JLabel("",icon1,JLabel.CENTER); mlb.setOpaque(true); mlb.setBounds(0,30,100,100); dp.add(mlb); //Menu Bar Defined mb1=new JMenuBar(); mb1.setBounds(0,0,1024,30); mb1.setBackground(cl1); dp.add(mb1); //Menu Item Defined m1=new JMenu("Staff"); m1.setMnemonic('S'); mb1.add(m1); m2=new JMenu("Candidate"); m2.setMnemonic('C'); mb1.add(m2); m3=new JMenu("Vacancy"); m3.setMnemonic('V'); mb1.add(m3); m4=new JMenu("Source"); m4.setMnemonic('o'); mb1.add(m4); m5=new JMenu("Registration"); m5.setMnemonic('R'); mb1.add(m5); m6=new JMenu("Report"); m6.setMnemonic('e'); mb1.add(m6); m7=new JMenu("JPA"); m7.setMnemonic('J'); mb1.add(m7);

39

Project Report

Job Placement Agency

it1=new JMenuItem("Staff Module"); it1.setMnemonic('M'); it1.addActionListener(this); m1.add(it1); it2=new JMenuItem("Show Record"); it2.setMnemonic('R'); it2.addActionListener(this); m1.add(it2); it3=new JMenuItem("Exit"); it3.setMnemonic('E'); it3.addActionListener(this); m1.add(it3); it4=new JMenuItem("Candidate Module"); it4.setMnemonic('M'); it4.addActionListener(this); m2.add(it4); it5=new JMenuItem("Show Record"); it5.setMnemonic('R'); it5.addActionListener(this); m2.add(it5); it6=new JMenuItem("Vacancy Module"); it6.setMnemonic('M'); it6.addActionListener(this); m3.add(it6); it7=new JMenuItem("Show Record"); it7.setMnemonic('R'); it7.addActionListener(this); m3.add(it7); it8=new JMenuItem("Source Module"); it8.setMnemonic('M'); it8.addActionListener(this); m4.add(it8); it9=new JMenuItem("Show Record"); it9.setMnemonic('R'); it9.addActionListener(this);

40

Project Report m4.add(it9); it10=new JMenuItem("Registration Module"); it10.setMnemonic('M'); it10.addActionListener(this); m5.add(it10); it11=new JMenuItem("Show Record"); it11.setMnemonic('R'); it11.addActionListener(this); m5.add(it11); it12=new JMenuItem("Report Module"); it12.setMnemonic('M'); it12.addActionListener(this); m6.add(it12); it13=new JMenuItem("Show Record"); it13.setMnemonic('R'); it13.addActionListener(this); m6.add(it13); it14=new JMenuItem("Help"); it14.setMnemonic('H'); it14.addActionListener(this); m7.add(it14);

Job Placement Agency

} public void actionPerformed(ActionEvent ae) { if(ae.getSource()==it1) //Calling of Staff Module { if(i==0) { StaffModule stm=new StaffModule(dp); StaffModule.frm.requestFocus(); i=1; } } if(ae.getSource()==it2) { if(i==0) //Calling of Staff Record Module { StaffShow ss=new StaffShow(dp);

41

Project Report StaffShow.frm.requestFocus(); i=1;

Job Placement Agency

} } if(ae.getSource()==it3) //Exit coding { JOptionPane.showMessageDialog(null,"this will quit your Application","Warning Message",JOptionPane. WARNING_MESSAGE); System.exit(0); } if(ae.getSource()==it4) //Calling of Candidate module { if(i==0) { CandidateModule cdtm=new CandidateModule(dp); CandidateModule.frm.requestFocus(); i=1; } } if(ae.getSource()==it5) //Calling of Candidate Record { if(i==0) { CandidateShow cs=new CandidateShow(dp); CandidateShow.frm.requestFocus(); i=1; } } if(ae.getSource()==it6) //Calling of Vacancy Module { if(i==0) { VacancyModule vcnym=new VacancyModule(dp); VacancyModule.frm.requestFocus(); i=1; } } if(ae.getSource()==it7) //Calling of Vacancy Record { if(i==0)

42

Project Report {

Job Placement Agency

VacancyShow vs=new VacancyShow(dp); VacancyShow.frm.requestFocus(); i=1; } } if(ae.getSource()==it8) //Calling of Source Module { if(i==0) { SourceModule scm=new SourceModule(dp); SourceModule.frm.requestFocus(); i=1; } } if(ae.getSource()==it9) //Calling of Source Record { if(i==0) { SourceShow scs=new SourceShow(dp); SourceShow.frm.requestFocus(); i=1; } } if(ae.getSource()==it10) //Calling of Registration Module { if(i==0) { RegistrationModule rm1=new RegistrationModule(dp); RegistrationModule.frm.requestFocus(); i=1; } } if(ae.getSource()==it11) //Calling of Registration Record { if(i==0) { RegistrationShow rs=new RegistrationShow(dp); RegistrationShow.frm.requestFocus(); i=1; } } if(ae.getSource()==it12) //Calling of Report Module

43

Project Report {

Job Placement Agency

if(i==0) { ReportModule rpm1=new ReportModule(dp); ReportModule.frm.requestFocus(); i=1; } } if(ae.getSource()==it13) //Calling of Report Record { if(i==0) { ReportShow rpm1=new ReportShow(dp); ReportShow.frm.requestFocus(); i=1; } } if(ae.getSource()==it14) //Caling of JPA module { if(i==0) { AboutAgency aa=new AboutAgency(dp); AboutAgency.frm.requestFocus(); i=1; } } } }

44

Project Report

Job Placement Agency

Staff module:import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.border.*; import javax.swing.table.*; import javax.swing.*; import java.sql.*; public class StaffModule extends Jps implements ActionListener { static JInternalFrame frm; Container cn; JTabbedPane tp; JPanel p1,p2,p3,p4; JTable tab; DefaultTableModel dtm; JScrollPane sp,sp1,sp2,sp3,sp4; LineBorder lbr1; TitledBorder tbr1,tbr2,tbr3; BevelBorder bbr1; Color cl1,cl2,cl3; JPanel p11,p12,p13,p21,p22,p23; //Inner Pane JTextField tid,tname,tph_no,tsal,tdoj,tdsgn,tid1,tname1,tph_no1, tsal1,tdoj1,tdsgn1,tdid,tssid; JTextArea tadd,tadd1,tadd2,tadd3; JButton ok1,clr1,close1,ok2,clr2,close2,close3,close4,show2,del,search; JLabel sid,sname,sladd,spadd,sph_no,ssal,sdoj,sdsgn,sid1,sname1,sladd1, spadd1,sph_no1,ssal1,sdoj1,sdsgn1,did,ssid,umsg,dmsg,smsg; JRadioButton b1,b2,b3,b4,b5,b6,b7,b8; ButtonGroup bg,bg1; JComboBox cb1,cb2,cb3,cb4; Font ft; int i;

45

Project Report

Job Placement Agency

String str,head[]={"ID","Name","Local Add","Permanent add","Ph.No.","Qualification","Designation","DOJ","Salary"}; String arr[]=new String[9]; public StaffModule(JDesktopPane dp) { //Color Defined cl1=new Color(152,150,184); cl2=new Color(213,212,226); cl3=new Color(197,223,247); //Font Defined ft=new Font("Atial",Font.BOLD|Font.ITALIC,14); //Internal Frame Defined frm=new JInternalFrame("JPA-[Staff Module]",true,true,false,false); frm.setBounds(100,30,600,600); frm.setBackground(cl3); frm.setVisible(true); //Container Defined cn=frm.getContentPane(); cn.setLayout(null); dp.add(frm); //Border Defined //Line Border lbr1=new LineBorder(cl1); //Title Border tbr1=new TitledBorder(lbr1,"Personal Information"); tbr2=new TitledBorder(lbr1,"Educational Qualification"); tbr3=new TitledBorder(lbr1,"Official Information"); //BevelBorder bbr1=new BevelBorder(BevelBorder.RAISED); //Tabbed Pane Defined tp=new JTabbedPane(); tp.setBounds(0,20,600,400); tp.setVisible(true); cn.add(tp); //Panels Defined p1=new JPanel(); p2=new JPanel();

46

Project Report p3=new JPanel(); p4=new JPanel(); //Panels Layout Defined p1.setLayout(null); p2.setLayout(null); p3.setLayout(null); p4.setLayout(null); //Panels Color Defined p1.setBackground(cl1); p2.setBackground(cl1); p3.setBackground(cl1); p4.setBackground(cl1); //tabbed Pane Contain the Panels tp.add("New Record",p1); tp.add("Update Record",p2); tp.add("Delete Record",p3); tp.add("Search Record",p4); //Inner Panels Defined for p1 p11=new JPanel(); p11.setLayout(null); p11.setBackground(cl2); p11.setBounds(10,10,570,145); p11.setBorder(tbr1); p11.setVisible(true); p1.add(p11); p12=new JPanel(); p12.setLayout(null); p12.setBackground(cl2); p12.setBounds(10,175,570,55); p12.setBorder(tbr2); p12.setVisible(true); p1.add(p12); p13=new JPanel(); p13.setLayout(null); p13.setBackground(cl2); p13.setBounds(10,250,570,80); p13.setBorder(tbr3); p13.setVisible(true); p1.add(p13);

Job Placement Agency

47

Project Report //Inner Panels Defined for p2 p21=new JPanel(); p21.setLayout(null); p21.setBackground(cl2); p21.setBounds(10,30,570,145); p21.setBorder(tbr1); p21.setVisible(true); p2.add(p21); p22=new JPanel(); p22.setLayout(null); p22.setBackground(cl2); p22.setBounds(10,185,570,55); p22.setBorder(tbr2); p22.setVisible(true); p2.add(p22); p23=new JPanel(); p23.setLayout(null); p23.setBackground(cl2); p23.setBounds(10,250,570,80); p23.setBorder(tbr3); p23.setVisible(true); p2.add(p23); //Label Defined for save panel p1 sid=new JLabel("Staff ID"); sid.setBounds(10,20,100,20); p11.add(sid); sname=new JLabel("Staff Name"); sname.setBounds(300,20,100,20); p11.add(sname); sph_no=new JLabel("phone No"); sph_no.setBounds(10,110,100,20); p11.add(sph_no); sladd=new JLabel("Local Add"); sladd.setBounds(10,50,100,20); p11.add(sladd); spadd=new JLabel("Permanent Add"); spadd.setBounds(300,50,100,20);

Job Placement Agency

48

Project Report p11.add(spadd); sdsgn=new JLabel("Designation"); sdsgn.setBounds(10,20,100,20); p13.add(sdsgn); sdoj=new JLabel("Date Of Joining"); sdoj.setBounds(300,20,100,20); p13.add(sdoj); ssal=new JLabel("Salary"); ssal.setBounds(10,50,100,20); p13.add(ssal); //Label Defined for save panel p2 sid1=new JLabel("Staff ID"); sid1.setBounds(10,20,100,20); p21.add(sid1); sname1=new JLabel("Staff Name"); sname1.setBounds(300,20,100,20); sname1.setEnabled(false); p21.add(sname1); sph_no1=new JLabel("phone No"); sph_no1.setBounds(10,110,100,20); sph_no1.setEnabled(false); p21.add(sph_no1); sladd1=new JLabel("Local Add"); sladd1.setBounds(10,50,100,20); sladd1.setEnabled(false); p21.add(sladd1); spadd1=new JLabel("Permanent Add"); spadd1.setBounds(300,50,100,20); spadd1.setEnabled(false); p21.add(spadd1); sdsgn1=new JLabel("Designation"); sdsgn1.setBounds(10,20,100,20); sdsgn1.setEnabled(false); p23.add(sdsgn1);

Job Placement Agency

49

Project Report sdoj1=new JLabel("Date Of Joining"); sdoj1.setBounds(300,20,100,20); sdoj1.setEnabled(false); p23.add(sdoj1); ssal1=new JLabel("Salary"); ssal1.setBounds(10,50,90,20); ssal1.setEnabled(false); p23.add(ssal1);

Job Placement Agency

umsg=new JLabel("Enter the Staff ID which you want to update & click Show button",JLabel.CENTER); umsg.setBounds(50,5,500,20); umsg.setBackground(cl3); umsg.setFont(ft); umsg.setBorder(bbr1); umsg.setOpaque(true); p2.add(umsg); //Label Defined for delete panel p3 did=new JLabel("Staff ID"); did.setBounds(190,60,80,20); p3.add(did); dmsg=new JLabel("Enter the Staff ID which you want to Delete",JLabel.CENTER); dmsg.setBounds(130,20,320,20); dmsg.setBackground(cl3); dmsg.setFont(ft); dmsg.setBorder(bbr1); dmsg.setOpaque(true); p3.add(dmsg); //Label Defined for search panel p4 ssid=new JLabel("Staff ID"); ssid.setBounds(190,60,80,20); p4.add(ssid); smsg=new JLabel("Enter the Staff ID which you want to Search",JLabel.CENTER); smsg.setBounds(130,20,320,20); smsg.setBackground(cl3); smsg.setFont(ft); smsg.setBorder(bbr1);

50

Project Report smsg.setOpaque(true); p4.add(smsg); //textField defined for save panel p1 tid=new JTextField(); tid.setBounds(130,20,130,20); p11.add(tid); tname=new JTextField(); tname.setBounds(410,20,130,20); p11.add(tname); tph_no=new JTextField(); tph_no.setBounds(130,110,130,20); p11.add(tph_no); tdsgn=new JTextField(); tdsgn.setBounds(130,20,130,20); p13.add(tdsgn); tdoj=new JTextField(); tdoj.setBounds(510,20,50,20); p13.add(tdoj); tsal=new JTextField(); tsal.setBounds(130,50,130,20); p13.add(tsal); //textField defined for save panel p2 tid1=new JTextField(); tid1.setBounds(130,20,130,20); p21.add(tid1); tname1=new JTextField(); tname1.setBounds(410,20,130,20); tname1.setEnabled(false); p21.add(tname1); tph_no1=new JTextField(); tph_no1.setBounds(130,110,130,20); tph_no1.setEnabled(false);

Job Placement Agency

51

Project Report p21.add(tph_no1); tdsgn1=new JTextField(); tdsgn1.setBounds(130,20,130,20); tdsgn1.setEnabled(false); p23.add(tdsgn1); tdoj1=new JTextField(); tdoj1.setBounds(510,20,50,20); tdoj1.setEnabled(false); p23.add(tdoj1); tsal1=new JTextField(); tsal1.setBounds(130,50,130,20); tsal1.setEnabled(false); p23.add(tsal1); //textField defined for delete panel p3 tdid=new JTextField(); tdid.setBounds(260,60,100,20); p3.add(tdid); //textField defined for search panel p4 tssid=new JTextField(); tssid.setBounds(260,60,100,20); p4.add(tssid); //TextArea Defined for p1 tadd=new JTextArea(); tadd.setBounds(130,50,130,50); p11.add(tadd); tadd1=new JTextArea(); tadd1.setBounds(410,50,130,50); p11.add(tadd1); //TextArea Defined for p2 tadd2=new JTextArea(); tadd2.setBounds(130,50,130,50); tadd2.setEnabled(false); p21.add(tadd2); tadd3=new JTextArea();

Job Placement Agency

52

Project Report tadd3.setBounds(410,50,130,50); tadd3.setEnabled(false); p21.add(tadd3);

Job Placement Agency

//scrollPane Defined for p1 sp=new JScrollPane(tadd,JScrollPane.VERTICAL_SCROLLBAR_ AS_NEEDED,JScrollPane.HORIZONTAL_ SCROLLBAR_AS_NEEDED); sp.setBounds(130,50,130,50); p11.add(sp); sp1=new JScrollPane(tadd1,JScrollPane.VERTICAL_SCROLLBAR _AS_NEEDED,JScrollPane.HORIZONTAL_ SCROLLBAR_AS_NEEDED); sp1.setBounds(410,50,130,50); p11.add(sp1); //scrollPane Defined for p2 sp2=new JScrollPane(tadd2,JScrollPane.VERTICAL_SCROLLBAR _AS_NEEDED,JScrollPane.HORIZONTAL_ SCROLLBAR_AS_NEEDED); sp2.setBounds(130,50,130,50); p21.add(sp2); sp3=new JScrollPane(tadd3,JScrollPane.VERTICAL_SCROLLBAR _AS_NEEDED,JScrollPane.HORIZONTAL_ SCROLLBAR_AS_NEEDED); sp3.setBounds(410,50,130,50); p21.add(sp3); //Combo Box Defined for p1 cb1=new JComboBox (); cb2=new JComboBox (); cb1.setBounds(390,20,40,20); cb2.setBounds(440,20,60,20); cb1.addItem(""); for(i=1;i<=31;i++) { str=i+""; cb1.addItem(str); } cb2.addItem("");

53

Project Report cb2.addItem("Jan"); cb2.addItem("Feb"); cb2.addItem("March"); cb2.addItem("April"); cb2.addItem("May"); cb2.addItem("Jun"); cb2.addItem("July"); cb2.addItem("Aug"); cb2.addItem("Sep"); cb2.addItem("Oct"); cb2.addItem("Nov"); cb2.addItem("Dec"); p13.add(cb1); p13.add(cb2); //Combo Box Defined for p2 cb3=new JComboBox (); cb4=new JComboBox (); cb3.setBounds(390,20,40,20); cb4.setBounds(440,20,60,20); cb3.setEnabled(false); cb4.setEnabled(false); cb3.addItem(""); for(i=1;i<=31;i++) { str=i+""; cb3.addItem(str); } cb4.addItem(""); cb4.addItem("Jan"); cb4.addItem("Feb"); cb4.addItem("March"); cb4.addItem("April"); cb4.addItem("May"); cb4.addItem("Jun"); cb4.addItem("July"); cb4.addItem("Aug"); cb4.addItem("Sep"); cb4.addItem("Oct"); cb4.addItem("Nov");

Job Placement Agency

54

Project Report cb4.addItem("Dec"); p23.add(cb3); p23.add(cb4); //Button Group for Radio Button Defined bg=new ButtonGroup(); bg1=new ButtonGroup(); //Radiobutton Defined for p1 b1=new JRadioButton("High School"); b1.setBounds(20,30,100,20); b1.setBackground(cl2); bg.add(b1); p12.add(b1); b2=new JRadioButton("Intermediate"); b2.setBounds(150,30,100,20); b2.setBackground(cl2); bg.add(b2); p12.add(b2); b3=new JRadioButton("Graduation"); b3.setBounds(280,30,100,20); b3.setBackground(cl2); bg.add(b3); p12.add(b3); b4=new JRadioButton("Post Graduation"); b4.setBounds(410,30,120,20); b4.setBackground(cl2); bg.add(b4); p12.add(b4); //Radiobutton Defined for p2 b5=new JRadioButton("High School"); b5.setBounds(20,30,100,20); b5.setEnabled(false); b5.setBackground(cl2); bg1.add(b5); p22.add(b5); b6=new JRadioButton("Intermediate"); b6.setBounds(150,30,100,20);

Job Placement Agency

55

Project Report b6.setEnabled(false); b6.setBackground(cl2); bg1.add(b6); p22.add(b6); b7=new JRadioButton("Graduation"); b7.setBounds(280,30,100,20); b7.setEnabled(false); b7.setBackground(cl2); bg1.add(b7); p22.add(b7); b8=new JRadioButton("Post Graduation"); b8.setBounds(410,30,120,20); b8.setEnabled(false); b8.setBackground(cl2); bg1.add(b8); p22.add(b8); //Button defined for p1 ok1=new JButton("Save"); ok1.setBounds(105,340,80,20); ok1.addActionListener(this); p1.add(ok1); clr1=new JButton("Clear"); clr1.setBounds(255,340,80,20); clr1.addActionListener(this); p1.add(clr1); close1=new JButton("Close"); close1.setBounds(405,340,80,20); close1.addActionListener(this); p1.add(close1); //Button defined for p2 show2=new JButton("Show"); show2.setBounds(30,340,80,20); show2.addActionListener(this); p2.add(show2); ok2=new JButton("Update"); ok2.setBounds(180,340,80,20);

Job Placement Agency

56

Project Report ok2.setEnabled(false); ok2.addActionListener(this); p2.add(ok2); clr2=new JButton("Clear"); clr2.setBounds(320,340,80,20); clr2.setEnabled(false); clr2.addActionListener(this); p2.add(clr2); close2=new JButton("Close"); close2.setBounds(470,340,80,20); close2.addActionListener(this); p2.add(close2); //button defined for p3 close3=new JButton("Close"); close3.setBounds(280,110,80,20); close3.addActionListener(this); p3.add(close3); del=new JButton("Delete"); del.setBounds(170,110,80,20); del.addActionListener(this); p3.add(del); //button defined for p4 close4=new JButton("Close"); close4.setBounds(280,110,80,20); close4.addActionListener(this); p4.add(close4); search=new JButton("Search"); search.setBounds(170,110,80,20); search.addActionListener(this); p4.add(search); //Table Created dtm=new DefaultTableModel(head,0); tab=new JTable(dtm); tab.setBounds(0,420,590,130); cn.add(tab);

Job Placement Agency

57

Project Report

Job Placement Agency

sp2=new JScrollPane(tab,JScrollPane.VERTICAL_SCROLLBAR _AS_NEEDED,JScrollPane.HORIZONTAL_ SCROLLBAR_AS_NEEDED); sp2.setBounds(0,420,590,130); cn.add(sp2); } public void actionPerformed(ActionEvent ae) { if(ae.getSource()==ok1) { try { int Salary=Integer.parseInt(tsal.getText()); String DOJ=""+cb1.getSelectedItem()+"/"+ cb2.getSelectedItem()+"/"+tdoj.getText(); String qual=""; if(b1.isSelected()==true) { qual=b1.getText(); } if(b2.isSelected()==true) { qual=b2.getText(); } if(b3.isSelected()==true) { qual=b3.getText(); } if(b4.isSelected()==true) { qual=b4.getText(); } Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); st.executeUpdate("insert into Staff values('"+tid.getText() +"','"+tname.getText()+"','"+tadd.getText()+"','"+tadd1.getText() +"','"+tph_no.getText()+"','"+qual+"','"+tdsgn.getText() +"','"+DOJ+"',"+Salary+")"); arr[0]=tid.getText();

58

Project Report arr[1]=tname.getText(); arr[2]=tadd.getText(); arr[3]=tadd1.getText(); arr[4]=tph_no.getText(); arr[5]=qual; arr[6]=tdsgn.getText(); arr[7]=DOJ; arr[8]=tsal.getText(); dtm.addRow(arr); con.close(); tid.setText(""); tname.setText(""); tph_no.setText(""); tadd.setText(""); tadd1.setText(""); tdsgn.setText(""); tdoj.setText(""); tsal.setText(""); cb1.setSelectedIndex(0); cb2.setSelectedIndex(0); tid.requestFocus(); } catch(Exception E) {

Job Placement Agency

JOptionPane.showMessageDialog(null,"Duplicate or Null value not allowed","Warning Message",JOptionPane.WARNING_MESSAGE); } } if(ae.getSource()==clr1) { tid.setText(""); tname.setText(""); tph_no.setText(""); tadd.setText(""); tadd1.setText(""); tdsgn.setText(""); tdoj.setText(""); tsal.setText("");

59

Project Report cb1.setSelectedIndex(0); cb2.setSelectedIndex(0); } if(ae.getSource()==close1) { frm.dispose(); Jps.i=0; } if(ae.getSource()==show2) { try {

Job Placement Agency

String id=""+tid1.getText(); String cstr; int flag=0; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs1=st.executeQuery("select* from staff"); while(rs1.next()==true) { cstr=rs1.getString(1); if(cstr.equals(id)) { flag=1; } } if(flag==1) { ResultSet rs=st.executeQuery("select* from staff where ID='"+id+"'"); while(rs.next()==true) { tname1.setText(rs.getString(2)); tadd2.setText(rs.getString(3)); tadd3.setText(rs.getString(4));

60

Project Report

Job Placement Agency tph_no1.setText(rs.getString(5)); String qual1=rs.getString(6); if((b5.getText()).equals(qual1)) { b5.setSelected(true); } if((b6.getText()).equals(qual1)) { b6.setSelected(true); } if((b7.getText()).equals(qual1)) { b7.setSelected(true); } if((b8.getText()).equals(qual1)) { b8.setSelected(true); } tdsgn1.setText(rs.getString(7)); String s[]=rs.getString(8).split("/"); cb3.setSelectedItem(s[0]); cb4.setSelectedItem(s[1]); tdoj1.setText(s[2]); tsal1.setText(rs.getString(9)); sname1.setEnabled(true); sph_no1.setEnabled(true); sladd1.setEnabled(true); spadd1.setEnabled(true); sdsgn1.setEnabled(true); sdoj1.setEnabled(true); ssal1.setEnabled(true); tname1.setEnabled(true); tph_no1.setEnabled(true); tadd2.setEnabled(true); tadd3.setEnabled(true); tdsgn1.setEnabled(true); tdoj1.setEnabled(true); tsal1.setEnabled(true); umsg.setVisible(false); cb3.setEnabled(true);

61

Project Report cb4.setEnabled(true); ok2.setEnabled(true); clr2.setEnabled(true); b5.setEnabled(true); b6.setEnabled(true); b7.setEnabled(true); b8.setEnabled(true); } } else {

Job Placement Agency

JOptionPane.showMessageDialog(null,"Record not found","Warning Message", JOptionPane.WARNING_MESSAGE); } con.close(); } catch(Exception ex) { System.out.println("Exception Find"); } } if(ae.getSource()==ok2) { try { int Salary=Integer.parseInt(tsal1.getText()); String DOJ=""+cb3.getSelectedItem()+"/"+ cb4.getSelectedItem()+"/"+tdoj1.getText(); String qual=""; if(b5.isSelected()==true) { qual=b5.getText(); } if(b6.isSelected()==true) { qual=b6.getText(); } if(b7.isSelected()==true) { qual=b7.getText();

62

Project Report

Job Placement Agency } if(b8.isSelected()==true) { qual=b8.getText(); } Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); st.executeUpdate("update Staff set name='"+tname1.getText() +"',l_add='"+tadd2.getText()+"',p_add='"+tadd3.getText() +"',ph_no='"+tph_no1.getText() +"',qualification='"+qual+"',designation='"+tdsgn1.getText() +"',doj='"+DOJ+"',salary="+Salary+" where id='"+tid1.getText() +"'"); arr[0]=tid1.getText(); arr[1]=tname1.getText(); arr[2]=tadd2.getText(); arr[3]=tadd3.getText(); arr[4]=tph_no1.getText(); arr[5]=qual; arr[6]=tdsgn1.getText(); arr[7]=DOJ; arr[8]=tsal1.getText(); dtm.addRow(arr); con.close(); tid1.setText(""); tname1.setText(""); tph_no1.setText(""); tadd2.setText(""); tadd3.setText(""); tdsgn1.setText(""); tdoj1.setText(""); tsal1.setText(""); cb3.setSelectedIndex(0); cb4.setSelectedIndex(0); tid1.requestFocus(); tname1.setEnabled(false); tph_no1.setEnabled(false);

63

Project Report tadd2.setEnabled(false); tadd3.setEnabled(false); tdsgn1.setEnabled(false); tdoj1.setEnabled(false); tsal1.setEnabled(false); cb3.setEnabled(false); cb4.setEnabled(false); ok2.setEnabled(false); clr2.setEnabled(false); b5.setEnabled(false); b6.setEnabled(false); b7.setEnabled(false); b8.setEnabled(false); umsg.setVisible(true);

Job Placement Agency

} catch(Exception e) { System.out.println(e.getMessage()); } } if(ae.getSource()==clr2) { tid1.setText(""); tname1.setText(""); tph_no1.setText(""); tadd2.setText(""); tadd3.setText(""); tdsgn1.setText(""); tdoj1.setText(""); tsal1.setText(""); cb3.setSelectedIndex(0); cb4.setSelectedIndex(0); tname1.setEnabled(false); tph_no1.setEnabled(false); tadd2.setEnabled(false); tadd3.setEnabled(false); tdsgn1.setEnabled(false); tdoj1.setEnabled(false); tsal1.setEnabled(false); cb3.setEnabled(false); cb4.setEnabled(false);

64

Project Report ok2.setEnabled(false); clr2.setEnabled(false); b5.setEnabled(false); b6.setEnabled(false); b7.setEnabled(false); b8.setEnabled(false); } if(ae.getSource()==close2) { frm.dispose(); Jps.i=0; } if(ae.getSource()==close3) { frm.dispose(); Jps.i=0; } if(ae.getSource()==close4) { frm.dispose(); Jps.i=0;

Job Placement Agency

} if(ae.getSource()==del) { try { String cstr; int flag=0; String id=""+tdid.getText(); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs1=st.executeQuery("select* from staff"); while(rs1.next()==true) { cstr=rs1.getString(1); if(cstr.equals(id))

65

Project Report { flag=1;

Job Placement Agency

} } if(flag==1) { int response=JOptionPane.showConfirmDialog (null,"this will Delete the Record"+"\nwant to Deleteit?","Information",JOptionPane.YES_NOOPTION,J OptionPane.QUESTION_MESSAGE); if(response==0) { st.executeUpdate("delete from staff ID='"+id+"'"); tdid.requestFocus(); } else tdid.setText(""); } else { JOptionPane.showMessageDialog(null, "Record not found","Warning Message", JOptionPane.WARNING_MESSAGE); } con.close(); tdid.setText(""); } catch(Exception e) { System.out.println(e.getMessage()); } } if(ae.getSource()==search) { try { String cstr; int flag=0; String id=""+tssid.getText(); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

where

66

Project Report

Job Placement Agency String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs1=st.executeQuery("select* from staff"); while(rs1.next()==true) { cstr=rs1.getString(1); if(cstr.equals(id)) { flag=1; } } if(flag==1) { ResultSet rs=st.executeQuery("select * from staff where ID='"+id+"'"); while(rs.next()==true) { arr[0]=rs.getString(1); arr[1]=rs.getString(2); arr[2]=rs.getString(3); arr[3]=rs.getString(4); arr[4]=rs.getString(5); arr[5]=rs.getString(6); arr[6]=rs.getString(7); arr[7]=rs.getString(8); arr[8]=rs.getString(9); dtm.addRow(arr); tssid.requestFocus(); } } else { JOptionPane.showMessageDialog(null,"Record not found","Warning Message", JOptionPane.WARNING_MESSAGE); } con.close(); tssid.setText("");

67

Project Report

Job Placement Agency

} catch(Exception e) { System.out.println(e.getMessage()); } } } }

Staff Record Module:import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.border.*; import javax.swing.table.*; import javax.swing.*; import java.sql.*; public class StaffShow extends Jps implements ActionListener { static JInternalFrame frm; Container cn; JTable tab; DefaultTableModel dtm; JScrollPane sp; BevelBorder bbr1; Color cl1,cl2,cl3; Font ft; JLabel umsg; JButton close1,show1; String head[]={"ID","Name","Local Add","Permanent add","Ph.No.","Qualification","Designation","DOJ","Salary"}; String arr[]=new String[9]; public StaffShow(JDesktopPane dp) { //Color Defined cl1=new Color(152,150,184);

68

Project Report cl2=new Color(213,212,226); cl3=new Color(197,223,247);

Job Placement Agency

//Font Defined ft=new Font("Atial",Font.BOLD|Font.ITALIC,14); //Internal Frame Defined frm=new JInternalFrame("JPA-[Staff Record]",true,true,false,false); frm.setBounds(100,30,600,600); frm.setBackground(cl3); frm.setVisible(true); //Container Defined cn=frm.getContentPane(); cn.setLayout(null); dp.add(frm); //BevelBorder Defined bbr1=new BevelBorder(BevelBorder.RAISED); //Label Defined umsg=new JLabel("STAFF RECORD",JLabel.CENTER); umsg.setBounds(200,10,150,20); umsg.setBackground(cl1); umsg.setFont(ft); umsg.setBorder(bbr1); umsg.setOpaque(true); cn.add(umsg); //Button Defined close1=new JButton("Close"); close1.setBounds(90,460,80,20); close1.addActionListener(this); cn.add(close1); show1=new JButton("Show"); show1.setBounds(5,460,80,20); show1.addActionListener(this); cn.add(show1); //Table Created dtm=new DefaultTableModel(head,0); tab=new JTable(dtm); tab.setBounds(5,50,580,400);

69

Project Report

Job Placement Agency

cn.add(tab); sp=new JScrollPane(tab,JScrollPane.VERTICAL_SCROLLBAR_ AS_NEEDED,JScrollPane.HORIZONTAL_ SCROLLBAR_AS_NEEDED); sp.setBounds(5,50,580,400); cn.add(sp); } public void actionPerformed(ActionEvent ae) { if(ae.getSource()==close1) { frm.dispose(); Jps.i=0; } if(ae.getSource()==show1) { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs=st.executeQuery("select * from staff"); while(rs.next()==true) { arr[0]=rs.getString(1); arr[1]=rs.getString(2); arr[2]=rs.getString(3); arr[3]=rs.getString(4); arr[4]=rs.getString(5); arr[5]=rs.getString(6); arr[6]=rs.getString(7); arr[7]=rs.getString(8); arr[8]=rs.getString(9); dtm.addRow(arr); } con.close(); } catch(Exception e) {

70

Project Report System.out.println("Exception"); } } } }

Job Placement Agency

Candidate Module:import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.border.*; import javax.swing.table.*; import javax.swing.*; import java.sql.*; public class CandidateModule extends Jps implements ActionListener { static JInternalFrame frm; Container cn; JTabbedPane tp; JPanel p1,p2,p3,p4; JTable tab; DefaultTableModel dtm; JScrollPane sp,sp1,sp2,sp3; LineBorder lbr1; TitledBorder tbr1,tbr2; BevelBorder bbr1; Color cl1,cl2,cl3; JPanel p11,p12,p21,p22; //Inner Pane JTextField tid,tname,tph_no,tdob,tid1,tname1,tph_no1,tdob1,tdid,tssid; JTextArea tadd,tadd1,tadd2,tadd3; JButton ok1,clr1,close1,ok2,clr2,close2,close3,close4,show2,del,search; JLabel cid,cname,cladd,cpadd,cph_no,cdob,csex,cid1,cname1,cladd1, cpadd1,cph_no1,cdob1,csex1,did,ssid,umsg,dmsg,smsg; JRadioButton b1,b2,b3,b4,b5,b6,b7,b8; ButtonGroup bg,bg1; JComboBox cb1,cb2,cb3,cb4,cb5,cb6,cb7,cb8; Font ft;

71

Project Report

Job Placement Agency

String str,head[]={"ID","Name","Local Add","Permanent Add","Ph.No.","DOB","Gender","Qualification"}; String arr[]=new String[8]; public CandidateModule(JDesktopPane dp) { //Color Defined cl1=new Color(152,150,184); cl2=new Color(213,212,226); cl3=new Color(197,223,247); //Font Defined ft=new Font("Arial",Font.BOLD|Font.ITALIC,14); //Internal Frame Defined frm=new JInternalFrame("JPA-[CandidateModule]", true,true,false,false); frm.setBounds(100,30,600,600); frm.setBackground(cl3); frm.setVisible(true); //Container Defined cn=frm.getContentPane(); cn.setLayout(null); dp.add(frm); //Border Defined //Line Border lbr1=new LineBorder(cl1); //Title Border tbr1=new TitledBorder(lbr1,"Personal Information"); tbr2=new TitledBorder(lbr1,"Educational Qualification"); //BevelBorder bbr1=new BevelBorder(BevelBorder.RAISED); //Tabbed Pane Defined tp=new JTabbedPane(); tp.setBounds(0,20,600,400); tp.setVisible(true); cn.add(tp); //Panels Defined p1=new JPanel();

72

Project Report p2=new JPanel(); p3=new JPanel(); p4=new JPanel(); //Panels Layout Defined p1.setLayout(null); p2.setLayout(null); p3.setLayout(null); p4.setLayout(null); //Panels Color Defined p1.setBackground(cl1); p2.setBackground(cl1); p3.setBackground(cl1); p4.setBackground(cl1); //tabbed Pane Contain the Panels tp.add("New Record",p1); tp.add("Update Record",p2); tp.add("Delete Record",p3); tp.add("Search Record",p4); //Inner Panels Defined for p1 p11=new JPanel(); p11.setLayout(null); p11.setBackground(cl2); p11.setBounds(10,10,570,170); p11.setBorder(tbr1); p11.setVisible(true); p1.add(p11); p12=new JPanel(); p12.setLayout(null); p12.setBackground(cl2); p12.setBounds(10,220,570,70); p12.setBorder(tbr2); p12.setVisible(true); p1.add(p12); //Inner Panels Defined for p2 p21=new JPanel(); p21.setLayout(null); p21.setBackground(cl2); p21.setBounds(10,50,570,170); p21.setBorder(tbr1); p21.setVisible(true);

Job Placement Agency

73

Project Report p2.add(p21); p22=new JPanel(); p22.setLayout(null); p22.setBackground(cl2); p22.setBounds(10,230,570,70); p22.setBorder(tbr2); p22.setVisible(true); p2.add(p22); //Label Defined for save panel p1 cid=new JLabel("Candidate ID"); cid.setBounds(10,20,100,20); p11.add(cid); cname=new JLabel("Candidate Name"); cname.setBounds(280,20,100,20); p11.add(cname); cph_no=new JLabel("Phone No"); cph_no.setBounds(10,110,100,20); p11.add(cph_no); cladd=new JLabel("Local Add"); cladd.setBounds(10,50,100,20); p11.add(cladd); cpadd=new JLabel("Permanent Add"); cpadd.setBounds(280,50,100,20); p11.add(cpadd); cdob=new JLabel("Date Of Birth"); cdob.setBounds(280,110,100,20); p11.add(cdob); csex=new JLabel("Gender"); csex.setBounds(10,140,100,20); p11.add(csex); //Label Defined for save panel p2 cid1=new JLabel("Candidate ID"); cid1.setBounds(10,20,100,20); p21.add(cid1);

Job Placement Agency

74

Project Report

Job Placement Agency

cname1=new JLabel("Candidate Name"); cname1.setBounds(280,20,100,20); cname1.setEnabled(false); p21.add(cname1); cph_no1=new JLabel("Phone No"); cph_no1.setBounds(10,110,100,20); cph_no1.setEnabled(false); p21.add(cph_no1); cladd1=new JLabel("Local Add"); cladd1.setBounds(10,50,100,20); cladd1.setEnabled(false); p21.add(cladd1); cpadd1=new JLabel("Permanent Add"); cpadd1.setBounds(280,50,100,20); cpadd1.setEnabled(false); p21.add(cpadd1); cdob1=new JLabel("Date Of Birth"); cdob1.setBounds(280,110,100,20); cdob1.setEnabled(false); p21.add(cdob1); csex1=new JLabel("Gender"); csex1.setBounds(10,140,100,20); csex1.setEnabled(false); p21.add(csex1); umsg=new JLabel("Enter the Candidate ID which you want to update & click Show button",JLabel.CENTER); umsg.setBounds(50,10,500,20); umsg.setBackground(cl3); umsg.setFont(ft); umsg.setBorder(bbr1); umsg.setOpaque(true); p2.add(umsg); //Label Defined for delete panel p3 did=new JLabel("Candidate ID"); did.setBounds(190,60,80,20); p3.add(did);

75

Project Report

Job Placement Agency

dmsg=new JLabel("Enter the Candidate ID which you want to Delete",JLabel.CENTER); dmsg.setBounds(120,20,340,20); dmsg.setBackground(cl3); dmsg.setFont(ft); dmsg.setBorder(bbr1); dmsg.setOpaque(true); p3.add(dmsg); //Label Defined for search panel p4 ssid=new JLabel("Candidate ID"); ssid.setBounds(190,60,80,20); p4.add(ssid); smsg=new JLabel("Enter the Candidate ID which you want to Search",JLabel.CENTER); smsg.setBounds(120,20,340,20); smsg.setBackground(cl3); smsg.setFont(ft); smsg.setBorder(bbr1); smsg.setOpaque(true); p4.add(smsg); //textField defined for save panel p1 tid=new JTextField(); tid.setBounds(110,20,130,20); p11.add(tid); tname=new JTextField(); tname.setBounds(380,20,130,20); p11.add(tname); tph_no=new JTextField(); tph_no.setBounds(110,110,130,20); p11.add(tph_no); tdob=new JTextField(); tdob.setBounds(500,110,50,20); p11.add(tdob); //textField defined for save panel p2

76

Project Report tid1=new JTextField(); tid1.setBounds(110,20,130,20); p21.add(tid1); tname1=new JTextField(); tname1.setBounds(380,20,130,20); tname1.setEnabled(false); p21.add(tname1); tph_no1=new JTextField(); tph_no1.setBounds(110,110,130,20); tph_no1.setEnabled(false); p21.add(tph_no1); tdob1=new JTextField(); tdob1.setBounds(500,110,50,20); tdob1.setEnabled(false); p21.add(tdob1); //TextField Defined for delete panel p3 tdid=new JTextField(); tdid.setBounds(270,60,80,20); p3.add(tdid); //TextField Defined for search panel p4 tssid=new JTextField(); tssid.setBounds(270,60,80,20); p4.add(tssid); //TextArea Defined for p1 tadd=new JTextArea(); tadd.setBounds(110,50,130,50); p11.add(tadd); tadd1=new JTextArea(); tadd1.setBounds(380,50,130,50); p11.add(tadd1); //TextArea Defined for p2 tadd2=new JTextArea(); tadd2.setBounds(110,50,130,50); tadd2.setEnabled(false); p21.add(tadd2);

Job Placement Agency

77

Project Report tadd3=new JTextArea(); tadd3.setBounds(380,50,130,50); tadd3.setEnabled(false); p21.add(tadd3);

Job Placement Agency

//scrollPane Defined for p1 sp=new JScrollPane(tadd,JScrollPane.VERTICAL_SCROLLBAR _AS_NEEDED,JScrollPane.HORIZONTAL_ SCROLLBAR_AS_NEEDED); sp.setBounds(110,50,130,50); p11.add(sp); sp1=new JScrollPane(tadd1,JScrollPane.VERTICAL_SCROLLBAR _AS_NEEDED,JScrollPane.HORIZONTAL_ SCROLLBAR_AS_NEEDED); sp1.setBounds(380,50,130,50); p11.add(sp1); //scrollPane Defined for p2 sp2=new JScrollPane(tadd2,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp2.setBounds(110,50,130,50); p21.add(sp2); sp3=new JScrollPane(tadd3,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp3.setBounds(380,50,130,50); p21.add(sp3); //Combo Box Defined for p1 cb1=new JComboBox (); cb2=new JComboBox (); cb5=new JComboBox (); cb1.setBounds(380,110,40,20); cb2.setBounds(430,110,60,20); cb5.setBounds(110,140,70,20); cb5.addItem("Male"); cb5.addItem("Female"); cb1.addItem(""); for(i=1;i<=31;i++)

78

Project Report { str=i+""; cb1.addItem(str); } cb2.addItem(""); cb2.addItem("Jan"); cb2.addItem("Feb"); cb2.addItem("Mar"); cb2.addItem("April"); cb2.addItem("May"); cb2.addItem("Jun"); cb2.addItem("July"); cb2.addItem("Aug"); cb2.addItem("Sep"); cb2.addItem("Oct"); cb2.addItem("Nov"); cb2.addItem("Dec"); p11.add(cb1); p11.add(cb2); p11.add(cb5); //Combo Box Defined for p2 cb3=new JComboBox (); cb4=new JComboBox (); cb6=new JComboBox (); cb3.setBounds(380,110,40,20); cb4.setBounds(430,110,60,20); cb6.setBounds(110,140,70,20); cb6.addItem("Male"); cb6.addItem("Female"); cb3.setEnabled(false); cb4.setEnabled(false); cb6.setEnabled(false); cb3.addItem(""); for(i=1;i<=31;i++) { str=i+""; cb3.addItem(str);

Job Placement Agency

79

Project Report } cb4.addItem(""); cb4.addItem("Jan"); cb4.addItem("Feb"); cb4.addItem("Mar"); cb4.addItem("April"); cb4.addItem("May"); cb4.addItem("Jun"); cb4.addItem("July"); cb4.addItem("Aug"); cb4.addItem("Sep"); cb4.addItem("Oct"); cb4.addItem("Nov"); cb4.addItem("Dec"); p21.add(cb3); p21.add(cb4); p21.add(cb6); //Button Group for Radio Button Defined bg=new ButtonGroup(); bg1=new ButtonGroup(); //Radiobutton Defined for p1 b1=new JRadioButton("High School"); b1.setBounds(20,30,100,20); b1.setBackground(cl2); bg.add(b1); p12.add(b1); b2=new JRadioButton("Intermediate"); b2.setBounds(150,30,100,20); b2.setBackground(cl2); bg.add(b2); p12.add(b2); b3=new JRadioButton("Graduation"); b3.setBounds(280,30,100,20); b3.setBackground(cl2); bg.add(b3); p12.add(b3); b4=new JRadioButton("Post Graduation"); b4.setBounds(410,30,120,20);

Job Placement Agency

80

Project Report b4.setBackground(cl2); bg.add(b4); p12.add(b4); //Radiobutton Defined for p2 b5=new JRadioButton("High School"); b5.setBounds(20,30,100,20); b5.setEnabled(false); b5.setBackground(cl2); bg1.add(b5); p22.add(b5); b6=new JRadioButton("Intermediate"); b6.setBounds(150,30,100,20); b6.setEnabled(false); b6.setBackground(cl2); bg1.add(b6); p22.add(b6); b7=new JRadioButton("Graduation"); b7.setBounds(280,30,100,20); b7.setEnabled(false); b7.setBackground(cl2); bg1.add(b7); p22.add(b7); b8=new JRadioButton("Post Graduation"); b8.setBounds(410,30,120,20); b8.setEnabled(false); b8.setBackground(cl2); bg1.add(b8); p22.add(b8); //Button defined for p1 ok1=new JButton("Save"); ok1.setBounds(105,340,80,20); ok1.addActionListener(this); p1.add(ok1); clr1=new JButton("Clear"); clr1.setBounds(255,340,80,20); clr1.addActionListener(this); p1.add(clr1);

Job Placement Agency

81

Project Report close1=new JButton("Close"); close1.setBounds(405,340,80,20); close1.addActionListener(this); p1.add(close1); //Button defined for p2 show2=new JButton("Show"); show2.setBounds(30,340,80,20); show2.addActionListener(this); p2.add(show2); ok2=new JButton("Update"); ok2.setBounds(180,340,80,20); ok2.setEnabled(false); ok2.addActionListener(this); p2.add(ok2); clr2=new JButton("Clear"); clr2.setBounds(320,340,80,20); clr2.setEnabled(false); clr2.addActionListener(this); p2.add(clr2); close2=new JButton("Close"); close2.setBounds(470,340,80,20); close2.addActionListener(this); p2.add(close2); //button defined for p3 close3=new JButton("Close"); close3.setBounds(280,110,80,20); close3.addActionListener(this); p3.add(close3); del=new JButton("Delete"); del.setBounds(170,110,80,20); del.addActionListener(this); p3.add(del); //button defined for p4 close4=new JButton("Close"); close4.setBounds(280,110,80,20); close4.addActionListener(this);

Job Placement Agency

82

Project Report p4.add(close4); search=new JButton("Search"); search.setBounds(170,110,80,20); search.addActionListener(this); p4.add(search);

Job Placement Agency

//Table Created dtm=new DefaultTableModel(head,0); tab=new JTable(dtm); tab.setBounds(0,420,590,130); cn.add(tab); sp2=new JScrollPane(tab,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp2.setBounds(0,420,590,130); cn.add(sp2); } public void actionPerformed(ActionEvent ae) { if(ae.getSource()==ok1) { try { String gender=""+cb5.getSelectedItem(); String DOB=""+cb1.getSelectedItem()+"/"+ cb2.getSelectedItem()+"/"+tdob.getText(); String qual=""; if(b1.isSelected()==true) { qual=b1.getText(); } if(b2.isSelected()==true) { qual=b2.getText(); } if(b3.isSelected()==true) { qual=b3.getText(); }

83

Project Report

Job Placement Agency if(b4.isSelected()==true) { qual=b4.getText(); } Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); st.executeUpdate("insert into Candidate values('"+tid.getText() +"','"+tname.getText()+"','"+ tadd.getText()+"','"+tadd1.getText()+"','"+ tph_no.getText()+"','"+DOB+"','"+gender+"','"+qual+"')"); arr[0]=tid.getText(); arr[1]=tname.getText(); arr[2]=tadd.getText(); arr[3]=tadd1.getText(); arr[4]=tph_no.getText(); arr[5]=DOB; arr[6]=gender; arr[7]=qual; dtm.addRow(arr); con.close(); tid.setText(""); tname.setText(""); tph_no.setText(""); tadd.setText(""); tadd1.setText(""); tdob.setText(""); cb1.setSelectedIndex(0); cb2.setSelectedIndex(0); cb5.setSelectedIndex(0); tid.requestFocus(); } catch(Exception E) { JOptionPane.showMessageDialog(null,"Duplicate or Null value not allowed","Warning Message",JOptionPane.WARNING_MESSAGE); }

84

Project Report

Job Placement Agency

if(ae.getSource()==clr1) { tid.setText(""); tname.setText(""); tph_no.setText(""); tadd.setText(""); tadd1.setText(""); tdob.setText(""); cb1.setSelectedIndex(0); cb2.setSelectedIndex(0); cb5.setSelectedIndex(0); tid.requestFocus(); } if(ae.getSource()==close1) { frm.dispose(); Jps.i=0; } if(ae.getSource()==show2) { try { String id=""+tid1.getText(); String cstr; int flag=0; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs1=st.executeQuery("select* from candidate"); while(rs1.next()==true) { cstr=rs1.getString(1); if(cstr.equals(id)) { flag=1; } } if(flag==1)

85

Project Report {

Job Placement Agency

ResultSet rs=st.executeQuery("select* from candidate where ID='"+id+"'"); while(rs.next()==true) { tname1.setText(rs.getString(2)); tadd2.setText(rs.getString(3)); tadd3.setText(rs.getString(4)); tph_no1.setText(rs.getString(5)); String s[]=rs.getString(6).split("/"); cb3.setSelectedItem(s[0]); cb4.setSelectedItem(s[1]); tdob1.setText(s[2]); cb6.setSelectedItem(rs.getString(7)); String qual1=rs.getString(8); if((b5.getText()).equals(qual1)) { b5.setSelected(true); } if((b6.getText()).equals(qual1)) { b6.setSelected(true); } if((b7.getText()).equals(qual1)) { b7.setSelected(true); } if((b8.getText()).equals(qual1)) { b8.setSelected(true); } cname1.setEnabled(true); cph_no1.setEnabled(true); cladd1.setEnabled(true); cpadd1.setEnabled(true); cdob1.setEnabled(true); csex1.setEnabled(true); tname1.setEnabled(true); tph_no1.setEnabled(true); tadd2.setEnabled(true);

86

Project Report tadd3.setEnabled(true); tdob1.setEnabled(true); umsg.setVisible(false); cb3.setEnabled(true); cb4.setEnabled(true); cb6.setEnabled(true); ok2.setEnabled(true); clr2.setEnabled(true); b5.setEnabled(true); b6.setEnabled(true); b7.setEnabled(true); b8.setEnabled(true); } } else {

Job Placement Agency

JOptionPane.showMessageDialog(null,"Record not found","Warning Message", JOptionPane.WARNING_MESSAGE); } con.close(); } catch(Exception ex) { System.out.println("Exception Find"); } } if(ae.getSource()==ok2) { try { String gender=""+cb6.getSelectedItem(); String DOB=""+cb3.getSelectedItem()+"/"+ cb4.getSelectedItem()+"/"+tdob1.getText(); String qual=""; if(b5.isSelected()==true) { qual=b5.getText(); } if(b6.isSelected()==true) { qual=b5.getText();

87

Project Report } if(b7.isSelected()==true) { qual=b5.getText(); } if(b8.isSelected()==true) { qual=b5.getText(); }

Job Placement Agency

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); st.executeUpdate("update candidate set name='"+tname1.getText()+"',l_add='"+tadd2.getText() +"',p_add='"+tadd3.getText()+"',ph_no='"+ tph_no1.getText()+"',dob='"+DOB+"',gender='"+ gender+"',qualification='"+qual+"' where id='"+tid1.getText()+"'"); arr[0]=tid1.getText(); arr[1]=tname1.getText(); arr[2]=tadd2.getText(); arr[3]=tadd3.getText(); arr[4]=tph_no1.getText(); arr[5]=DOB; arr[6]=gender; arr[7]=qual; dtm.addRow(arr); con.close(); tid1.setText(""); tname1.setText(""); tph_no1.setText(""); tadd2.setText(""); tadd3.setText(""); tdob1.setText(""); cb3.setSelectedIndex(0); cb4.setSelectedIndex(0); cb6.setSelectedIndex(0); tid1.requestFocus();

88

Project Report tname1.setEnabled(false); tph_no1.setEnabled(false); tadd2.setEnabled(false); tadd3.setEnabled(false); tdob1.setEnabled(false); cb3.setEnabled(false); cb4.setEnabled(false); cb6.setEnabled(false); ok2.setEnabled(false); clr2.setEnabled(false); b5.setEnabled(false); b6.setEnabled(false); b7.setEnabled(false); b8.setEnabled(false); umsg.setVisible(true);

Job Placement Agency

} catch(Exception E) { System.out.println(E.getMessage());; } } if(ae.getSource()==clr2) { tid1.setText(""); tname1.setText(""); tph_no1.setText(""); tadd2.setText(""); tadd3.setText(""); tdob1.setText(""); cb3.setSelectedIndex(0); cb4.setSelectedIndex(0); cb6.setSelectedIndex(0); tname1.setEnabled(false); tph_no1.setEnabled(false); tadd2.setEnabled(false); tadd3.setEnabled(false); tdob1.setEnabled(false); cb3.setEnabled(false); cb4.setEnabled(false); cb6.setEnabled(false); ok2.setEnabled(false); clr2.setEnabled(false);

89

Project Report b5.setEnabled(false); b6.setEnabled(false); b7.setEnabled(false); b8.setEnabled(false); } if(ae.getSource()==close2) { frm.dispose(); Jps.i=0; } if(ae.getSource()==close3) { frm.dispose(); Jps.i=0; } if(ae.getSource()==close4) { frm.dispose(); Jps.i=0; } if(ae.getSource()==del) { try {

Job Placement Agency

String cstr,cstr1,cstr2; int flag=0,flag1=0,flag2=0; String id=""+tdid.getText(); Class.forName("sun.jdbc.odbc.Jdbc OdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs1=st.executeQuery("select* from candidate"); while(rs1.next()==true) { cstr=rs1.getString(1);

90

Project Report

Job Placement Agency if(cstr.equals(id)) { flag=1; } } ResultSet rs2=st.executeQuery("select* from registration"); while(rs2.next()==true) { cstr1=rs2.getString(1); if(cstr1.equals(id)) { flag1=1; } } ResultSet rs3=st.executeQuery("select* from report"); while(rs3.next()==true) { cstr2=rs3.getString(1); if(cstr2.equals(id)) { flag2=1; } } if(flag==1 || flag1==1 || flag2==1) { int response=JOptionPane. showConfirmDialog(null, "this will Delete the Record"+"\nwant to Deleteit?","Information",JOptionPane.YES_ NO_OPTION,JOptionPane.QUESTION_ME SSAGE); if(response==0) { st.executeUpdate("delete from candidate where ID='"+id+"'"); st.executeUpdate("delete from registration where c_ID='"+id+"'"); st.executeUpdate("delete from report where candidate_ID='"+id+"'"); tdid.requestFocus(); }

91

Project Report else

Job Placement Agency

tdid.setText(""); } else { JOptionPane.showMessageDialog (null,"Record not found","Warning Message", JOptionPane.WARNING_MESSAGE); } con.close(); tdid.setText(""); } catch(Exception e) { System.out.println(e.getMessage()); } } if(ae.getSource()==search) { try { String cstr; int flag=0; String id=""+tssid.getText(); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs1=st.executeQuery("select* from candidate"); while(rs1.next()==true) { cstr=rs1.getString(1); if(cstr.equals(id)) { flag=1; } }

92

Project Report

Job Placement Agency if(flag==1) { ResultSet rs=st.executeQuery("select * from candidate where ID='"+id+"'"); while(rs.next()==true) { arr[0]=rs.getString(1); arr[1]=rs.getString(2); arr[2]=rs.getString(3); arr[3]=rs.getString(4); arr[4]=rs.getString(5); arr[5]=rs.getString(6); arr[6]=rs.getString(7); arr[7]=rs.getString(8); dtm.addRow(arr); tssid.setText(""); } } else { JOptionPane.showMessageDialog(null,"Record not found","Warning Message", JOptionPane.WARNING_MESSAGE); } con.close(); tssid.requestFocus();

} catch(Exception e) { System.out.println(e.getMessage()); } } } }

93

Project Report

Job Placement Agency

Candidate Record Module:import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.border.*; import javax.swing.table.*; import javax.swing.*; import java.sql.*; public class CandidateShow extends Jps implements ActionListener { static JInternalFrame frm; Container cn; JTable tab; DefaultTableModel dtm; JScrollPane sp; BevelBorder bbr1; Color cl1,cl2,cl3; Font ft; JLabel umsg; JButton close1,show1; String head[]={"ID","Name","Local Add","Permanent ","Ph.No.","DOB","Gender","Qualification"}; String arr[]=new String[8]; public CandidateShow(JDesktopPane dp) { //Color Defined cl1=new Color(152,150,184); cl2=new Color(213,212,226); cl3=new Color(197,223,247); //Font Defined ft=new Font("Atial",Font.BOLD|Font.ITALIC,14); //Internal Frame Defined frm=new JInternalFrame("JPA-[Candidate Record ]",true,true,false,false); frm.setBounds(100,30,600,600); frm.setBackground(cl3); frm.setVisible(true);

94

Project Report

Job Placement Agency

//Container Defined cn=frm.getContentPane(); cn.setLayout(null); dp.add(frm); //BevelBorder Defined bbr1=new BevelBorder(BevelBorder.RAISED); //Label Defined umsg=new JLabel("CANDIDATE RECORD",JLabel.CENTER); umsg.setBounds(200,10,150,20); umsg.setBackground(cl1); umsg.setFont(ft); umsg.setBorder(bbr1); umsg.setOpaque(true); cn.add(umsg); //Button Defined close1=new JButton("Close"); close1.setBounds(90,460,80,20); close1.addActionListener(this); cn.add(close1); show1=new JButton("Show"); show1.setBounds(5,460,80,20); show1.addActionListener(this); cn.add(show1); //Table Created dtm=new DefaultTableModel(head,0); tab=new JTable(dtm); tab.setBounds(5,50,580,400); cn.add(tab); sp=new JScrollPane(tab,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp.setBounds(5,50,580,400); cn.add(sp); } public void actionPerformed(ActionEvent ae) { if(ae.getSource()==close1)

95

Project Report { frm.dispose(); Jps.i=0;

Job Placement Agency

} if(ae.getSource()==show1) { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs=st.executeQuery("select * from candidate"); while(rs.next()==true) { arr[0]=rs.getString(1); arr[1]=rs.getString(2); arr[2]=rs.getString(3); arr[3]=rs.getString(4); arr[4]=rs.getString(5); arr[5]=rs.getString(6); arr[6]=rs.getString(7); arr[7]=rs.getString(8); dtm.addRow(arr); } con.close(); } catch(Exception e) { System.out.println("Exception"); } } } }

96

Project Report

Job Placement Agency

Vacancy Module:import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.border.*; import javax.swing.table.*; import javax.swing.*; import java.sql.*; public class VacancyModule extends Jps implements ActionListener { static JInternalFrame frm; Container cn; JTabbedPane tp; JPanel p1,p2,p3,p4; JTable tab; DefaultTableModel dtm; JScrollPane sp2; LineBorder lbr1; TitledBorder tbr1,tbr2; BevelBorder bbr1; Color cl1,cl2,cl3; JPanel p11,p12,p21,p22; //Inner Pane JTextField tid,tname,tsal,tpost,tcname,tid1,tname1,tsal1,tpost1,tcname1,tdid,tsid; JButton ok1,clr1,close1,ok2,clr2,close2,close3,close4,show2,del,search; JLabel vid,vname,vsal,vsex,vpost,vqual,cname,vid1,vname1,vsal1, vsex1,vpost1,vqual1,cname1,did,sid,umsg,dmsg,smsg; JRadioButton b1,b2,b3,b4,b5,b6,b7,b8; ButtonGroup bg,bg1; JComboBox cb1,cb2,cb3,cb4; Font ft; int i; String head[]={"V_ID","V_Name","V_Salary","No.of Post","Gender","Qualification","Co_Name"}; String arr[]=new String[7]; public VacancyModule(JDesktopPane dp) { //Color Defined

97

Project Report cl1=new Color(152,150,184); cl2=new Color(213,212,226); cl3=new Color(197,223,247);

Job Placement Agency

//font Defined ft=new Font("Arial",Font.BOLD|Font.ITALIC,14); //Internal Frame Defined frm=new JInternalFrame("JPA-[Vacancy Module]",true,true,false,false); frm.setBounds(100,30,600,600); frm.setBackground(cl3); frm.setVisible(true); //Container Defined cn=frm.getContentPane(); cn.setLayout(null); dp.add(frm); //Border Defined //Line Border lbr1=new LineBorder(cl1); //Title Border tbr1=new TitledBorder(lbr1,"Vacancy Detail"); //BevelBorder bbr1=new BevelBorder(BevelBorder.RAISED); //Tabbed Pane Defined tp=new JTabbedPane(); tp.setBounds(0,20,600,400); tp.setVisible(true); cn.add(tp); //Panels Defined p1=new JPanel(); p2=new JPanel(); p3=new JPanel(); p4=new JPanel(); //Panels Layout Defined p1.setLayout(null); p2.setLayout(null); p3.setLayout(null); p4.setLayout(null); //Panels Color Defined p1.setBackground(cl1);

98

Project Report p2.setBackground(cl1); p3.setBackground(cl1); p4.setBackground(cl1); //tabbed Pane Contain the Panels tp.add("New Record",p1); tp.add("Update Record",p2); tp.add("Delete Record",p3); tp.add("Search Record",p4); //Inner Panels Defined for p1 p11=new JPanel(); p11.setLayout(null); p11.setBackground(cl2); p11.setBounds(10,10,570,160); p11.setBorder(tbr1); p11.setVisible(true); p1.add(p11); p12=new JPanel(); p12.setLayout(null); p12.setBackground(cl2); p12.setBounds(170,190,230,60); p12.setBorder(lbr1); p12.setVisible(true); p1.add(p12); //Inner Panels Defined for p2 p21=new JPanel(); p21.setLayout(null); p21.setBackground(cl2); p21.setBounds(10,50,570,160); p21.setBorder(tbr1); p21.setVisible(true); p2.add(p21); p22=new JPanel(); p22.setLayout(null); p22.setBackground(cl2); p22.setBounds(170,230,230,60); p22.setBorder(lbr1); p22.setVisible(true); p2.add(p22);

Job Placement Agency

99

Project Report //Label Defined for save panel p1 vid=new JLabel("Vacancy ID"); vid.setBounds(10,20,100,20); p11.add(vid); vname=new JLabel("Vacancy Name"); vname.setBounds(280,20,100,20); p11.add(vname); vsal=new JLabel("Salary"); vsal.setBounds(10,60,100,20); p11.add(vsal); vpost=new JLabel("Required Post"); vpost.setBounds(280,60,100,20); p11.add(vpost); vsex=new JLabel("Required Gender"); vsex.setBounds(10,100,100,20); p11.add(vsex); vqual=new JLabel("Required Qualification"); vqual.setBounds(280,100,130,20); p11.add(vqual); cname=new JLabel("Company Name"); cname.setBounds(10,20,100,20); p12.add(cname); //Label Defined for save panel p2 vid1=new JLabel("Vacancy ID"); vid1.setBounds(10,20,100,20); p21.add(vid1); vname1=new JLabel("Vacancy Name"); vname1.setBounds(280,20,100,20); vname1.setEnabled(false); p21.add(vname1); vsal1=new JLabel("Salary"); vsal1.setBounds(10,60,100,20); vsal1.setEnabled(false); p21.add(vsal1);

Job Placement Agency

100

Project Report vpost1=new JLabel("Required Post"); vpost1.setBounds(280,60,100,20); vpost1.setEnabled(false); p21.add(vpost1); vsex1=new JLabel("Required Gender"); vsex1.setBounds(10,100,100,20); vsex1.setEnabled(false); p21.add(vsex1); vqual1=new JLabel("Required Qualification"); vqual1.setBounds(280,100,130,20); vqual1.setEnabled(false); p21.add(vqual1); cname1=new JLabel("Company Name"); cname1.setBounds(10,20,100,20); cname1.setEnabled(false); p22.add(cname1);

Job Placement Agency

umsg=new JLabel("Enter the Staff ID which you want to update & click Show button",JLabel.CENTER); umsg.setBounds(50,10,500,20); umsg.setBackground(cl3); umsg.setFont(ft); umsg.setBorder(bbr1); umsg.setOpaque(true); p2.add(umsg); //Label Defined for delete panel p3 did=new JLabel("Vacancy ID"); did.setBounds(190,60,80,20); p3.add(did); dmsg=new JLabel("Enter the Vacancy ID which you want to Delete",JLabel.CENTER); dmsg.setBounds(130,20,330,20); dmsg.setBackground(cl3); dmsg.setFont(ft); dmsg.setBorder(bbr1); dmsg.setOpaque(true); p3.add(dmsg); //Label Defined for search panel p4

101

Project Report sid=new JLabel("Vacancy ID"); sid.setBounds(190,60,80,20); p4.add(sid);

Job Placement Agency

smsg=new JLabel("Enter the Vacancy ID which you want to Search",JLabel.CENTER); smsg.setBounds(130,20,330,20); smsg.setBackground(cl3); smsg.setFont(ft); smsg.setBorder(bbr1); smsg.setOpaque(true); p4.add(smsg); //TextField Defined for save panel p1 tid=new JTextField(); tid.setBounds(110,20,110,20); p11.add(tid); tname=new JTextField(); tname.setBounds(410,20,110,20); p11.add(tname); tsal=new JTextField(); tsal.setBounds(110,60,110,20); p11.add(tsal); tpost=new JTextField(); tpost.setBounds(410,60,110,20); p11.add(tpost); tcname=new JTextField(); tcname.setBounds(110,20,110,20); p12.add(tcname); //TextField Defined for save panel p2 tid1=new JTextField(); tid1.setBounds(110,20,110,20); p21.add(tid1); tname1=new JTextField(); tname1.setBounds(410,20,110,20); tname1.setEnabled(false); p21.add(tname1);

102

Project Report

Job Placement Agency

tsal1=new JTextField(); tsal1.setBounds(110,60,110,20); tsal1.setEnabled(false); p21.add(tsal1); tpost1=new JTextField(); tpost1.setBounds(410,60,110,20); tpost1.setEnabled(false); p21.add(tpost1); tcname1=new JTextField(); tcname1.setBounds(110,20,110,20); tcname1.setEnabled(false); p22.add(tcname1); //TextField Defined for delete panel p3 tdid=new JTextField(); tdid.setBounds(270,60,80,20); p3.add(tdid); //TextField Defined for search panel p4 tsid=new JTextField(); tsid.setBounds(270,60,80,20); p4.add(tsid); //Combo Box Defined for p1 cb1=new JComboBox (); cb2=new JComboBox (); cb1.setBounds(110,100,60,20); cb2.setBounds(410,100,110,20); cb1.addItem("Male"); cb1.addItem("Female"); cb2.addItem("High School"); cb2.addItem("Intermediate"); cb2.addItem("Graduation"); cb2.addItem("Post Graduation"); p11.add(cb1); p11.add(cb2);

103

Project Report //Combo Box Defined for p2 cb3=new JComboBox (); cb4=new JComboBox (); cb3.setBounds(110,100,60,20); cb4.setBounds(410,100,110,20); cb3.setEnabled(false); cb4.setEnabled(false); cb3.addItem("Male"); cb3.addItem("Female"); cb4.addItem("High School"); cb4.addItem("Intermediate"); cb4.addItem("Graduation"); cb4.addItem("Post Graduation"); p21.add(cb3); p21.add(cb4); //Button defined for p1 ok1=new JButton("Save"); ok1.setBounds(105,340,80,20); ok1.addActionListener(this); p1.add(ok1); clr1=new JButton("Clear"); clr1.setBounds(255,340,80,20); clr1.addActionListener(this); p1.add(clr1); close1=new JButton("Close"); close1.setBounds(405,340,80,20); close1.addActionListener(this); p1.add(close1); //Button defined for p2 show2=new JButton("Show"); show2.setBounds(30,340,80,20); show2.addActionListener(this); p2.add(show2); ok2=new JButton("Update");

Job Placement Agency

104

Project Report ok2.setBounds(180,340,80,20); ok2.setEnabled(false); ok2.addActionListener(this); p2.add(ok2); clr2=new JButton("Clear"); clr2.setBounds(320,340,80,20); clr2.setEnabled(false); clr2.addActionListener(this); p2.add(clr2); close2=new JButton("Close"); close2.setBounds(470,340,80,20); close2.addActionListener(this); p2.add(close2); //button defined for p3 close3=new JButton("Close"); close3.setBounds(280,110,80,20); close3.addActionListener(this); p3.add(close3); del=new JButton("Delete"); del.setBounds(170,110,80,20); del.addActionListener(this); p3.add(del); //button defined for p4 close4=new JButton("Close"); close4.setBounds(280,110,80,20); close4.addActionListener(this); p4.add(close4); search=new JButton("Search"); search.setBounds(170,110,80,20); search.addActionListener(this); p4.add(search);

Job Placement Agency

//Table Created dtm=new DefaultTableModel(head,0); tab=new JTable(dtm);

105

Project Report

Job Placement Agency

tab.setBounds(0,420,590,130); cn.add(tab); sp2=new JScrollPane(tab,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp2.setBounds(0,420,590,130); cn.add(sp2); } public void actionPerformed(ActionEvent ae) { if(ae.getSource()==ok1) { try { String gender=""+cb1.getSelectedItem(); String qual=""+cb2.getSelectedItem(); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); st.executeUpdate("insert into vacancy values('"+tid.getText()+"','"+tname.getText()+"','" +tsal.getText()+"','"+tpost.getText()+"','"+gender+"', '"+qual+"','"+tcname.getText()+"')"); arr[0]=tid.getText(); arr[1]=tname.getText(); arr[2]=tsal.getText(); arr[3]=tpost.getText(); arr[4]=gender; arr[5]=qual; arr[6]=tcname.getText(); dtm.addRow(arr); con.close(); tid.setText(""); tname.setText(""); tsal.setText(""); tpost.setText(""); tcname.setText(""); cb1.setSelectedIndex(0);

106

Project Report cb2.setSelectedIndex(0);

Job Placement Agency

} catch(Exception E) { JOptionPane.showMessageDialog(null,"Duplicate or Null value not allowed","Warning Message", JOptionPane.WARNING_MESSAGE); } } if(ae.getSource()==clr1) { tid.setText(""); tname.setText(""); tsal.setText(""); tpost.setText(""); tcname.setText(""); cb1.setSelectedIndex(0); cb2.setSelectedIndex(0); } if(ae.getSource()==close1) { frm.dispose(); Jps.i=0; } if(ae.getSource()==show2) { try { String id=""+tid1.getText(); String cstr; int flag=0; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs1=st.executeQuery("select* from vacancy"); while(rs1.next()==true) {

107

Project Report

Job Placement Agency cstr=rs1.getString(1); if(cstr.equals(id)) { flag=1; } } if(flag==1) { ResultSet rs=st.executeQuery("select* from vacancy where ID='"+id+"'"); while(rs.next()==true) { tname1.setText(rs.getString(2)); tsal1.setText(rs.getString(3)); tpost1.setText(rs.getString(4)); cb3.setSelectedItem(rs.getString(5)); cb4.setSelectedItem(rs.getString(6)); tcname1.setText(rs.getString(7)); vname1.setEnabled(true); vsal1.setEnabled(true); vpost1.setEnabled(true); vsex1.setEnabled(true); vqual1.setEnabled(true); cname1.setEnabled(true); tname1.setEnabled(true); tsal1.setEnabled(true); tpost1.setEnabled(true); tcname1.setEnabled(true); umsg.setVisible(false); cb3.setEnabled(true); cb4.setEnabled(true); ok2.setEnabled(true); clr2.setEnabled(true); } } else { JOptionPane.showMessageDialog(null,"Record not found","Warning Message", JOptionPane.WARNING_MESSAGE);

108

Project Report } con.close();

Job Placement Agency

} catch(Exception ex) { System.out.println("Exception Find"); } } if(ae.getSource()==ok2) { try { String gender=""+cb3.getSelectedItem(); String qual=""+cb4.getSelectedItem(); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); st.executeUpdate("update vacancy set v_name='"+tname1.getText()+"', salary='"+tsal1.getText()+"', no_of_post='"+tpost1.getText()+"', gender='"+gender+"', qualification='"+qual+"', company_name='"+tcname1.getText()+"' where id='"+tid1.getText()+"'"); arr[0]=tid1.getText(); arr[1]=tname1.getText(); arr[2]=tsal1.getText(); arr[3]=tpost1.getText(); arr[4]=gender; arr[5]=qual; arr[6]=tcname1.getText(); dtm.addRow(arr); con.close(); tid1.setText(""); tname1.setText(""); tsal1.setText(""); tpost1.setText(""); tcname1.setText("");

109

Project Report cb3.setSelectedIndex(0); cb4.setSelectedIndex(0); tid1.requestFocus(); tname1.setEnabled(false); tsal1.setEnabled(false); tpost1.setEnabled(false); tcname1.setEnabled(false); cb3.setEnabled(false); cb4.setEnabled(false); ok2.setEnabled(false); clr2.setEnabled(false); umsg.setVisible(true);

Job Placement Agency

} catch(Exception E) { System.out.println(E.getMessage());; } } if(ae.getSource()==clr2) { tid1.setText(""); tname1.setText(""); tsal1.setText(""); tpost1.setText(""); tcname1.setText(""); cb3.setSelectedIndex(0); cb4.setSelectedIndex(0); tname1.setEnabled(false); tsal1.setEnabled(false); tpost1.setEnabled(false); tcname1.setEnabled(false); cb3.setEnabled(false); cb4.setEnabled(false); ok2.setEnabled(false); clr2.setEnabled(false); } if(ae.getSource()==close2)

110

Project Report { frm.dispose(); Jps.i=0; } if(ae.getSource()==close3) { frm.dispose(); Jps.i=0; } if(ae.getSource()==close4) { frm.dispose(); Jps.i=0;

Job Placement Agency

} if(ae.getSource()==del) { try { String cstr; int flag=0; String id=""+tdid.getText(); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs1=st.executeQuery("select* from vacancy"); while(rs1.next()==true) { cstr=rs1.getString(1); if(cstr.equals(id)) { flag=1; } } if(flag==1) { int response=JOptionPane. showConfirmDialog(null,"this will

111

Project Report

Job Placement Agency Delete the Record"+"\nwant to Delete it?","Information",JOptionPane.YES_NO_ OPTION,JOptionPane.QUESTION_MESSAGE); if(response==0) { st.executeUpdate("delete from vacancy where ID='"+id+"'"); tdid.setText(""); } else tdid.setText(""); } else { OptionPane.showMessageDialog(null,"Record not found","Warning Message", JOptionPane.WARNING_MESSAGE); } con.close(); tdid.requestFocus(); } catch(Exception e) { System.out.println(e.getMessage()); } } if(ae.getSource()==search) { try { String cstr; int flag=0; String id=""+tsid.getText(); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs1=st.executeQuery("select* from vacancy");

112

Project Report

Job Placement Agency while(rs1.next()==true) { cstr=rs1.getString(1); if(cstr.equals(id)) { flag=1; } } if(flag==1) { ResultSet rs=st.executeQuery("select * from vacancy where ID='"+id+"'"); while(rs.next()==true) { arr[0]=rs.getString(1); arr[1]=rs.getString(2); arr[2]=rs.getString(3); arr[3]=rs.getString(4); arr[4]=rs.getString(5); arr[5]=rs.getString(6); arr[6]=rs.getString(7); dtm.addRow(arr); tsid.setText(""); } } else { JOptionPane.showMessageDialog(null,"Record not found","Warning Message", JOptionPane.WARNING_MESSAGE); } con.close(); tsid.requestFocus(); } catch(Exception e) { System.out.println(e.getMessage()); } }

} }

113

Project Report

Job Placement Agency

Vacancy Record Module:import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.border.*; import javax.swing.table.*; import javax.swing.*; import java.sql.*; public class VacancyShow extends Jps implements ActionListener { static JInternalFrame frm; Container cn; JTable tab; DefaultTableModel dtm; JScrollPane sp; BevelBorder bbr1; Color cl1,cl2,cl3; Font ft; JLabel umsg; JButton close1,show1; String head[]={"V_ID","V_Name","V_Salary","No.of Post","Gender","Qualification","Co_Name"}; String arr[]=new String[7]; public VacancyShow(JDesktopPane dp) { //Color Defined cl1=new Color(152,150,184); cl2=new Color(213,212,226); cl3=new Color(197,223,247); //Font Defined ft=new Font("Atial",Font.BOLD|Font.ITALIC,14); //Internal Frame Defined frm=new JInternalFrame("JPA-[Vacancy Record ]",true,true,false,false); frm.setBounds(100,30,600,600); frm.setBackground(cl3);

114

Project Report frm.setVisible(true); //Container Defined cn=frm.getContentPane(); cn.setLayout(null); dp.add(frm); //BevelBorder Defined bbr1=new BevelBorder(BevelBorder.RAISED);

Job Placement Agency

//Label Defined umsg=new JLabel("VACANCY RECORD",JLabel.CENTER); umsg.setBounds(200,10,150,20); umsg.setBackground(cl1); umsg.setFont(ft); umsg.setBorder(bbr1); umsg.setOpaque(true); cn.add(umsg); //Button Defined close1=new JButton("Close"); close1.setBounds(90,460,80,20); close1.addActionListener(this); cn.add(close1); show1=new JButton("Show"); show1.setBounds(5,460,80,20); show1.addActionListener(this); cn.add(show1); //Table Created dtm=new DefaultTableModel(head,0); tab=new JTable(dtm); tab.setBounds(5,50,580,400); cn.add(tab); sp=new JScrollPane(tab,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp.setBounds(5,50,580,400); cn.add(sp); } public void actionPerformed(ActionEvent ae) {

115

Project Report if(ae.getSource()==close1) { frm.dispose(); Jps.i=0;

Job Placement Agency

} if(ae.getSource()==show1) { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs=st.executeQuery("select * from vacancy"); while(rs.next()==true) { arr[0]=rs.getString(1); arr[1]=rs.getString(2); arr[2]=rs.getString(3); arr[3]=rs.getString(4); arr[4]=rs.getString(5); arr[5]=rs.getString(6); arr[6]=rs.getString(7); dtm.addRow(arr); } con.close(); } catch(Exception e) { System.out.println("Exception"); } } } }

116

Project Report

Job Placement Agency

Source Module:import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.border.*; import javax.swing.table.*; import javax.swing.*; import java.sql.*; public class SourceModule extends Jps implements ActionListener { static JInternalFrame frm; Container cn; JTabbedPane tp; JPanel p1,p2,p3,p4; JTable tab; DefaultTableModel dtm; JScrollPane sp,sp1,sp2; LineBorder lbr1; TitledBorder tbr1; BevelBorder bbr1; Color cl1,cl2,cl3; JPanel p11,p111,p21,p211; //Inner Pane JTextField tid,tname,tph_no,tph_no1,tid1,tname1,tdid,tsid; JTextArea tadd,tadd1; JButton ok1,clr1,close1,ok2,clr2,close2,close3,close4,show2,del,search; JLabel coid,coname,coref,coph_no,coadd,coid1,coname1,coref1, coph_no1,coadd1,did,sid,umsg,dmsg,smsg; JRadioButton b1,b2,b3,b4; ButtonGroup bg,bg1; Font ft; String head[]={"ID","Co_Name","Address","Ph.No.","Reference"}; String arr[]=new String[5]; public SourceModule(JDesktopPane dp) { //Color Defined cl1=new Color(152,150,184); cl2=new Color(213,212,226);

117

Project Report cl3=new Color(197,223,247);

Job Placement Agency

//font defined ft=new Font("Arial",Font.BOLD|Font.ITALIC,14); //Internal Frame Defined frm=new JInternalFrame("JPA-[Source Module]",true,true,false,false); frm.setBounds(100,30,600,600); frm.setBackground(cl3); frm.setVisible(true); //Container Defined cn=frm.getContentPane(); cn.setLayout(null); dp.add(frm); //Border Defined //Line Border lbr1=new LineBorder(cl1); //Title Border tbr1=new TitledBorder(lbr1,"Company Information"); //BevelBorder bbr1=new BevelBorder(BevelBorder.RAISED); //Tabbed Pane Defined tp=new JTabbedPane(); tp.setBounds(0,20,600,400); tp.setVisible(true); cn.add(tp); //Panels Defined p1=new JPanel(); p2=new JPanel(); p3=new JPanel(); p4=new JPanel(); //Panels Layout Defined p1.setLayout(null); p2.setLayout(null); p3.setLayout(null); p4.setLayout(null); //Panels Color Defined p1.setBackground(cl1); p2.setBackground(cl1); p3.setBackground(cl1);

118

Project Report p4.setBackground(cl1); //tabbed Pane Contain the Panels tp.add("New Record",p1); tp.add("Update Record",p2); tp.add("Delete Record",p3); tp.add("Search Record",p4); //Inner Panels Defined for p1 p11=new JPanel(); p11.setLayout(null); p11.setBackground(cl2); p11.setBounds(10,20,570,180); p11.setBorder(tbr1); p11.setVisible(true); p1.add(p11); p111=new JPanel(); p111.setLayout(null); p111.setBackground(cl2); p111.setBounds(35,100,220,60); p111.setBorder(lbr1); p111.setVisible(true); p11.add(p111); //Inner Panels Defined for p2 p21=new JPanel(); p21.setLayout(null); p21.setBackground(cl2); p21.setBounds(10,60,570,180); p21.setBorder(tbr1); p21.setVisible(true); p2.add(p21); p211=new JPanel(); p211.setLayout(null); p211.setBackground(cl2); p211.setBounds(35,100,220,60); p211.setBorder(lbr1); p211.setVisible(true); p21.add(p211); //Label Defined for save panel p1 coid=new JLabel("Company ID");

Job Placement Agency

119

Project Report coid.setBounds(40,20,100,20); p11.add(coid); coname=new JLabel("Company Name"); coname.setBounds(40,60,100,20); p11.add(coname); coref=new JLabel("Reference"); coref.setBounds(5,5,100,20); p111.add(coref); coph_no=new JLabel("Phone No"); coph_no.setBounds(300,20,100,20); p11.add(coph_no); coadd=new JLabel("Address"); coadd.setBounds(300,60,100,20); p11.add(coadd); //Label Defined for save panel p2 coid1=new JLabel("Company ID"); coid1.setBounds(40,20,100,20); p21.add(coid1); coname1=new JLabel("Company Name"); coname1.setBounds(40,60,100,20); coname1.setEnabled(false); p21.add(coname1); coref1=new JLabel("Reference"); coref1.setBounds(5,5,100,20); coref1.setEnabled(false); p211.add(coref1); coph_no1=new JLabel("Phone No"); coph_no1.setBounds(300,20,100,20); coph_no1.setEnabled(false); p21.add(coph_no1); coadd1=new JLabel("Address"); coadd1.setBounds(300,60,100,20); coadd1.setEnabled(false); p21.add(coadd1);

Job Placement Agency

120

Project Report

Job Placement Agency

umsg=new JLabel("Enter the Company ID which you want to update & click Show button",JLabel.CENTER); umsg.setBounds(50,10,500,20); umsg.setBackground(cl3); umsg.setFont(ft); umsg.setBorder(bbr1); umsg.setOpaque(true); p2.add(umsg); //Label Defined for delete panel p3 did=new JLabel("Company ID"); did.setBounds(190,60,80,20); p3.add(did); dmsg=new JLabel("Enter the Company ID which you want to Delete",JLabel.CENTER); dmsg.setBounds(130,20,320,20); dmsg.setBackground(cl3); dmsg.setFont(ft); dmsg.setBorder(bbr1); dmsg.setOpaque(true); p3.add(dmsg); //Label Defined for search panel p4 sid=new JLabel("Company ID"); sid.setBounds(190,60,80,20); p4.add(sid); smsg=new JLabel("Enter the Company ID which you want to Search",JLabel.CENTER); smsg.setBounds(130,20,320,20); smsg.setBackground(cl3); smsg.setFont(ft); smsg.setBorder(bbr1); smsg.setOpaque(true); p4.add(smsg); //TextField Defined for save panel p1 tid=new JTextField(); tid.setBounds(140,20,110,20); p11.add(tid);

121

Project Report tname=new JTextField(); tname.setBounds(140,60,110,20); p11.add(tname); tph_no=new JTextField(); tph_no.setBounds(400,20,110,20); p11.add(tph_no); //TextField Defined for save panel p2 tid1=new JTextField(); tid1.setBounds(140,20,110,20); p21.add(tid1); tname1=new JTextField(); tname1.setBounds(140,60,110,20); tname1.setEnabled(false); p21.add(tname1); tph_no1=new JTextField(); tph_no1.setBounds(400,20,110,20); tph_no1.setEnabled(false); p21.add(tph_no1); //TextField Defined for delete panel p3 tdid=new JTextField(); tdid.setBounds(290,60,80,20); p3.add(tdid); //TextField Defined for search panel p4 tsid=new JTextField(); tsid.setBounds(290,60,80,20); p4.add(tsid); //TextArea Defined for p1 tadd=new JTextArea(); tadd.setBounds(400,60,130,50); p11.add(tadd); //TextArea Defined for p2 tadd1=new JTextArea(); tadd1.setBounds(400,60,130,50); tadd1.setEnabled(false); p21.add(tadd1);

Job Placement Agency

122

Project Report

Job Placement Agency

//scrollPane Defined for p1 sp=new JScrollPane(tadd,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp.setBounds(400,60,110,50); p11.add(sp); //scrollPane Defined for p2 sp1=new JScrollPane(tadd1,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp1.setBounds(400,60,110,50); p21.add(sp1); //Button Group for Radio Button Defined bg=new ButtonGroup(); bg1=new ButtonGroup(); //Radiobutton Defined for p1 b1=new JRadioButton("Tie Up Company"); b1.setBounds(100,5,118,20); b1.setBackground(cl2); bg.add(b1); p111.add(b1); b2=new JRadioButton("Calling Company"); b2.setBounds(100,30,119,20); b2.setBackground(cl2); bg.add(b2); p111.add(b2); //Radiobutton Defined for p2 b3=new JRadioButton("Tie Up Company"); b3.setBounds(100,5,118,20); b3.setEnabled(false); b3.setBackground(cl2); bg1.add(b3); p211.add(b3); b4=new JRadioButton("Calling Company"); b4.setBounds(100,30,119,20); b4.setEnabled(false);

123

Project Report b4.setBackground(cl2); bg1.add(b4); p211.add(b4); //Button defined for p1 ok1=new JButton("Save"); ok1.setBounds(105,340,80,20); ok1.addActionListener(this); p1.add(ok1); clr1=new JButton("Clear"); clr1.setBounds(255,340,80,20); clr1.addActionListener(this); p1.add(clr1); close1=new JButton("Close"); close1.setBounds(405,340,80,20); close1.addActionListener(this); p1.add(close1); //Button defined for p2 show2=new JButton("Show"); show2.setBounds(30,340,80,20); show2.addActionListener(this); p2.add(show2); ok2=new JButton("Update"); ok2.setBounds(180,340,80,20); ok2.setEnabled(false); ok2.addActionListener(this); p2.add(ok2); clr2=new JButton("Clear"); clr2.setBounds(320,340,80,20); clr2.setEnabled(false); clr2.addActionListener(this); p2.add(clr2); close2=new JButton("Close"); close2.setBounds(470,340,80,20); close2.addActionListener(this); p2.add(close2); //button defined for p3

Job Placement Agency

124

Project Report close3=new JButton("Close"); close3.setBounds(290,110,80,20); close3.addActionListener(this); p3.add(close3); del=new JButton("Delete"); del.setBounds(180,110,80,20); del.addActionListener(this); p3.add(del); //button defined for p4 close4=new JButton("Close"); close4.setBounds(290,110,80,20); close4.addActionListener(this); p4.add(close4); search=new JButton("Search"); search.setBounds(180,110,80,20); search.addActionListener(this); p4.add(search);

Job Placement Agency

//Table Created dtm=new DefaultTableModel(head,0); tab=new JTable(dtm); tab.setBounds(0,420,590,130); cn.add(tab); sp2=new JScrollPane(tab,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp2.setBounds(0,420,590,130); cn.add(sp2); } public void actionPerformed(ActionEvent ae) { if(ae.getSource()==ok1) { try { String ref=""; if(b1.isSelected()==true) { ref=b1.getText();

125

Project Report } if(b2.isSelected()==true) { ref=b2.getText(); }

Job Placement Agency

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); st.executeUpdate("insert into Source values('"+tid.getText() +"','"+tname.getText()+"', '"+tadd.getText()+"','"+tph_no.getText()+"','"+ref+"')"); arr[0]=tid.getText(); arr[1]=tname.getText(); arr[2]=tadd.getText(); arr[3]=tph_no.getText(); arr[4]=ref; dtm.addRow(arr); con.close(); tid.setText(""); tname.setText(""); tph_no.setText(""); tadd.setText(""); tid.requestFocus(); } catch(Exception E) { JOptionPane.showMessageDialog(null,"Duplicate or Null value not allowed","Warning Message", JOptionPane.WARNING_MESSAGE); } } if(ae.getSource()==clr1) { tid.setText(""); tname.setText(""); tph_no.setText(""); tadd.setText("");

126

Project Report tid.requestFocus(); } if(ae.getSource()==close1) { frm.dispose(); Jps.i=0;

Job Placement Agency

} if(ae.getSource()==show2) { try { String id=""+tid1.getText(); String cstr; int flag=0; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs1=st.executeQuery("select* from source"); while(rs1.next()==true) { cstr=rs1.getString(1); if(cstr.equals(id)) { flag=1; } } if(flag==1) { ResultSet rs=st.executeQuery("select* from source where ID='"+id+"'"); while(rs.next()==true) { tname1.setText(rs.getString(2)); tadd1.setText(rs.getString(3)); tph_no1.setText(rs.getString(4)); String ref1=rs.getString(5); if((b3.getText()).equals(ref1))

127

Project Report {

Job Placement Agency

b3.setSelected(true); } if((b4.getText()).equals(ref1)) { b4.setSelected(true); } coname1.setEnabled(true); coref1.setEnabled(true); coph_no1.setEnabled(true); coadd1.setEnabled(true); tname1.setEnabled(true); tph_no1.setEnabled(true); tadd1.setEnabled(true); umsg.setVisible(false); b3.setEnabled(true); b4.setEnabled(true); ok2.setEnabled(true); clr2.setEnabled(true); } } else { JOptionPane.showMessageDialog(null,"Record not found","Warning Message", JOptionPane.WARNING_MESSAGE); } con.close(); } catch(Exception ex) { System.out.println("Exception Find"); } } if(ae.getSource()==ok2) { try { String ref=""; if(b3.isSelected()==true) {

128

Project Report ref=b1.getText(); } if(b4.isSelected()==true) { ref=b2.getText(); }

Job Placement Agency

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); st.executeUpdate("update Source set name='"+tname1.getText()+"', address='"+tadd1.getText()+"', ph_no='"+tph_no1.getText()+"', reference='"+ref+"' where id='"+tid1.getText()+"'" ); arr[0]=tid1.getText(); arr[1]=tname1.getText(); arr[2]=tadd1.getText(); arr[3]=tph_no1.getText(); arr[4]=ref; dtm.addRow(arr); con.close(); tid1.setText(""); tname1.setText(""); tph_no1.setText(""); tadd1.setText(""); tid1.requestFocus(); tname1.setEnabled(false); tph_no1.setEnabled(false); tadd1.setEnabled(false); b3.setEnabled(false); b4.setEnabled(false); ok2.setEnabled(false); clr2.setEnabled(false); umsg.setVisible(true); } catch(Exception E) {

129

Project Report

Job Placement Agency System.out.println(E.getMessage()); } } if(ae.getSource()==clr2) { tid1.setText(""); tname1.setText(""); tph_no1.setText(""); tadd1.setText(""); tid1.requestFocus(); tname1.setEnabled(false); tph_no1.setEnabled(false); tadd1.setEnabled(false); b3.setEnabled(false); b4.setEnabled(false); ok2.setEnabled(false); clr2.setEnabled(false); } if(ae.getSource()==close2) { frm.dispose(); Jps.i=0; } if(ae.getSource()==close3) { frm.dispose(); Jps.i=0; } if(ae.getSource()==close4) { frm.dispose(); Jps.i=0; } if(ae.getSource()==del) { try { String cstr;

130

Project Report

Job Placement Agency int flag=0; String id=""+tdid.getText(); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs1=st.executeQuery("select* from source"); while(rs1.next()==true) { cstr=rs1.getString(1); if(cstr.equals(id)) { flag=1; } } if(flag==1) { int response=JOptionPane.showConfirm Dialog(null,"this will Delete the Record"+"\nwant to Deleteit?","Information",JOptionPane.YES_ NO_OPTION,JOptionPane.QUESTION_MESSAG E); if(response==0) { st.executeUpdate("delete from source where ID='"+id+"'"); tdid.setText(""); } else tdid.setText(""); } else { JOptionPane.showMessageDialog (null,"Record not found","Warning Message", JOptionPane.WARNING_MESSAGE); } con.close(); tdid.requestFocus(); } catch(Exception e)

131

Project Report {

Job Placement Agency

System.out.println(e.getMessage()); } } if(ae.getSource()==search) { try { String cstr; int flag=0; String id=""+tsid.getText(); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs1=st.executeQuery("select* from source"); while(rs1.next()==true) { cstr=rs1.getString(1); if(cstr.equals(id)) { flag=1; } } if(flag==1) { ResultSet rs=st.executeQuery("select * from source where ID='"+id+"'"); while(rs.next()==true) { arr[0]=rs.getString(1); arr[1]=rs.getString(2); arr[2]=rs.getString(3); arr[3]=rs.getString(4); arr[4]=rs.getString(5); dtm.addRow(arr); tsid.setText(""); } } else {

132

Project Report

Job Placement Agency JOptionPane.showMessageDialog(null,"Record not found","Warning Message", JOptionPane.WARNING_MESSAGE); } con.close(); tsid.requestFocus(); } catch(Exception e) { System.out.println(e.getMessage()); } }

} }

Source Record Module:import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.border.*; import javax.swing.table.*; import javax.swing.*; import java.sql.*; public class SourceShow extends Jps implements ActionListener { static JInternalFrame frm; Container cn; JTable tab; DefaultTableModel dtm; JScrollPane sp; BevelBorder bbr1; Color cl1,cl2,cl3; Font ft; JLabel umsg; JButton close1,show1; String head[]={"ID","Co_Name","Address","Ph.No.","Reference"}; String arr[]=new String[5];

133

Project Report public SourceShow(JDesktopPane dp) { //Color Defined cl1=new Color(152,150,184); cl2=new Color(213,212,226); cl3=new Color(197,223,247);

Job Placement Agency

//Font Defined ft=new Font("Atial",Font.BOLD|Font.ITALIC,14); //Internal Frame Defined frm=new JInternalFrame("JPA-[Source Record ]",true,true,false,false); frm.setBounds(100,30,600,600); frm.setBackground(cl3); frm.setVisible(true); //Container Defined cn=frm.getContentPane(); cn.setLayout(null); dp.add(frm); //BevelBorder Defined bbr1=new BevelBorder(BevelBorder.RAISED); //Label Defined umsg=new JLabel("SOURCE RECORD",JLabel.CENTER); umsg.setBounds(200,10,150,20); umsg.setBackground(cl1); umsg.setFont(ft); umsg.setBorder(bbr1); umsg.setOpaque(true); cn.add(umsg); //Button Defined close1=new JButton("Close"); close1.setBounds(90,460,80,20); close1.addActionListener(this); cn.add(close1); show1=new JButton("Show"); show1.setBounds(5,460,80,20); show1.addActionListener(this); cn.add(show1);

134

Project Report

Job Placement Agency

//Table Created dtm=new DefaultTableModel(head,0); tab=new JTable(dtm); tab.setBounds(5,50,580,400); cn.add(tab); sp=new JScrollPane(tab,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp.setBounds(5,50,580,400); cn.add(sp); } public void actionPerformed(ActionEvent ae) { if(ae.getSource()==close1) { frm.dispose(); Jps.i=0; } if(ae.getSource()==show1) { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs=st.executeQuery("select * from source"); while(rs.next()==true) { arr[0]=rs.getString(1); arr[1]=rs.getString(2); arr[2]=rs.getString(3); arr[3]=rs.getString(4); arr[4]=rs.getString(5); dtm.addRow(arr); } con.close(); } catch(Exception e) {

135

Project Report System.out.println("Exception"); } } } }

Job Placement Agency

Registration Module:import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.border.*; import javax.swing.table.*; import javax.swing.*; import java.sql.*; public class RegistrationModule extends Jps implements ActionListener { static JInternalFrame frm; Container cn; JTabbedPane tp; JPanel p1,p2,p3,p4; JTable tab; DefaultTableModel dtm; JScrollPane sp; LineBorder lbr1; TitledBorder tbr1; BevelBorder bbr1; Color cl1,cl2,cl3; JPanel p11,p12,p21,p22; //Inner Pane JTextField tcid,tp_fee,td_fee,tt_fee,trid,tcid1,tp_fee1, td_fee1,tt_fee1,trid1,tdid,tsid; JButton ok1,clr1,close1,ok2,clr2,close2,close3,close4,show2,del,search; JLabel cid,p_fee,d_fee,t_fee,rid,cid1,p_fee1,d_fee1,t_fee1,rid1, did,sid,umsg,dmsg,smsg; Font ft; String head[]={"C_ID","Reg_ID","Paid Fee","Due Fee","Total Fee"}; String arr[]=new String[5]; public RegistrationModule(JDesktopPane dp)

136

Project Report { //Color Defined cl1=new Color(152,150,184); cl2=new Color(213,212,226); cl3=new Color(197,223,247);

Job Placement Agency

//font Defined ft=new Font("Arial",Font.BOLD|Font.ITALIC,14); //Internal Frame Defined frm=new JInternalFrame("JPA-[Registration Module]", true,true,false,false); frm.setBounds(100,30,600,600); frm.setBackground(cl3); frm.setVisible(true); //Container Defined cn=frm.getContentPane(); cn.setLayout(null); dp.add(frm); //Border Defined //Line Border lbr1=new LineBorder(cl1); //Title Border tbr1=new TitledBorder(lbr1,"Registration Detail"); //BevelBorder bbr1=new BevelBorder(BevelBorder.RAISED); //Tabbed Pane Defined tp=new JTabbedPane(); tp.setBounds(0,20,600,400); tp.setVisible(true); cn.add(tp); //Panels Defined p1=new JPanel(); p2=new JPanel(); p3=new JPanel(); p4=new JPanel(); //Panels Layout Defined p1.setLayout(null); p2.setLayout(null); p3.setLayout(null);

137

Project Report p4.setLayout(null); //Panels Color Defined p1.setBackground(cl1); p2.setBackground(cl1); p3.setBackground(cl1); p4.setBackground(cl1); //tabbed Pane Contain the Panels tp.add("New Record",p1); tp.add("Update Record",p2); tp.add("Delete Record",p3); tp.add("Search Record",p4); //Inner Panels Defined for p1 p11=new JPanel(); p11.setLayout(null); p11.setBackground(cl2); p11.setBounds(10,100,570,110); p11.setBorder(tbr1); p11.setVisible(true); p1.add(p11); p12=new JPanel(); p12.setLayout(null); p12.setBackground(cl2); p12.setBounds(170,10,230,60); p12.setBorder(lbr1); p12.setVisible(true); p1.add(p12); //Inner Panels Defined for p2 p21=new JPanel(); p21.setLayout(null); p21.setBackground(cl2); p21.setBounds(10,140,570,110); p21.setBorder(tbr1); p21.setVisible(true); p2.add(p21); p22=new JPanel(); p22.setLayout(null); p22.setBackground(cl2); p22.setBounds(170,60,230,60); p22.setBorder(lbr1);

Job Placement Agency

138

Project Report p22.setVisible(true); p2.add(p22); //Label Defined for save panel p1 rid=new JLabel("Registration ID"); rid.setBounds(20,20,100,20); p11.add(rid); p_fee=new JLabel("Paid Fee"); p_fee.setBounds(280,20,100,20); p11.add(p_fee); d_fee=new JLabel("Due Fee"); d_fee.setBounds(20,70,100,20); p11.add(d_fee); t_fee=new JLabel("Total Fee"); t_fee.setBounds(280,70,100,20); p11.add(t_fee); cid=new JLabel("Candidate ID"); cid.setBounds(10,20,100,20); p12.add(cid); //Label Defined for save panel p2 rid1=new JLabel("Registration ID"); rid1.setBounds(20,20,100,20); p21.add(rid1); p_fee1=new JLabel("Paid Fee"); p_fee1.setBounds(280,20,100,20); p_fee1.setEnabled(false); p21.add(p_fee1); d_fee1=new JLabel("Due Fee"); d_fee1.setBounds(20,70,100,20); d_fee1.setEnabled(false); p21.add(d_fee1); t_fee1=new JLabel("Total Fee"); t_fee1.setBounds(280,70,100,20); t_fee1.setEnabled(false); p21.add(t_fee1);

Job Placement Agency

139

Project Report cid1=new JLabel("Candidate ID"); cid1.setBounds(10,20,100,20); cid1.setEnabled(false); p22.add(cid1);

Job Placement Agency

umsg=new JLabel("Enter the Registration ID which you want to update & click Show button",JLabel.CENTER); umsg.setBounds(50,10,500,20); umsg.setBackground(cl3); umsg.setFont(ft); umsg.setBorder(bbr1); umsg.setOpaque(true); p2.add(umsg);

//Label Defined for delete panel p3 did=new JLabel("Registration ID"); did.setBounds(170,60,100,20); p3.add(did); dmsg=new JLabel("Enter the Registration ID which you want to Delete",JLabel.CENTER); dmsg.setBounds(120,20,345,20); dmsg.setBackground(cl3); dmsg.setFont(ft); dmsg.setBorder(bbr1); dmsg.setOpaque(true); p3.add(dmsg); //Label Defined for search panel p4 sid=new JLabel("Registration ID"); sid.setBounds(170,60,100,20); p4.add(sid); smsg=new JLabel("Enter the Registration ID which you want to Search",JLabel.CENTER); smsg.setBounds(120,20,345,20); smsg.setBackground(cl3); smsg.setFont(ft); smsg.setBorder(bbr1); smsg.setOpaque(true); p4.add(smsg);

140

Project Report //Text Field Defined for save panel p1 trid=new JTextField(); trid.setBounds(120,20,100,20); p11.add(trid); tp_fee=new JTextField(); tp_fee.setBounds(380,20,100,20); p11.add(tp_fee); td_fee=new JTextField(); td_fee.setBounds(120,70,100,20); p11.add(td_fee); tt_fee=new JTextField(); tt_fee.setBounds(380,70,100,20); p11.add(tt_fee); tcid=new JTextField(); tcid.setBounds(110,20,100,20); p12.add(tcid); //Text Field Defined for save panel p2 trid1=new JTextField(); trid1.setBounds(120,20,100,20); p21.add(trid1); tp_fee1=new JTextField(); tp_fee1.setBounds(380,20,100,20); tp_fee1.setEnabled(false); p21.add(tp_fee1); td_fee1=new JTextField(); td_fee1.setBounds(120,70,100,20); td_fee1.setEnabled(false); p21.add(td_fee1); tt_fee1=new JTextField(); tt_fee1.setBounds(380,70,100,20); tt_fee1.setEnabled(false); p21.add(tt_fee1); tcid1=new JTextField(); tcid1.setBounds(110,20,100,20); tcid1.setEnabled(false);

Job Placement Agency

141

Project Report p22.add(tcid1); //Text Field Defined for delete panel p3 tdid=new JTextField(); tdid.setBounds(280,60,80,20); p3.add(tdid);

Job Placement Agency

dmsg=new JLabel("Enter the Registration ID which you want to Delete",JLabel.CENTER); dmsg.setBounds(120,20,345,20); dmsg.setBackground(cl3); dmsg.setFont(ft); dmsg.setOpaque(true); p3.add(dmsg); //Text Field Defined for search panel p4 tsid=new JTextField(); tsid.setBounds(280,60,80,20); p4.add(tsid); smsg=new JLabel("Enter the Registration ID which you want to Search",JLabel.CENTER); smsg.setBounds(120,20,345,20); smsg.setBackground(cl3); smsg.setFont(ft); smsg.setOpaque(true); p4.add(smsg); //Button defined for p1 ok1=new JButton("Save"); ok1.setBounds(105,340,80,20); ok1.addActionListener(this); p1.add(ok1); clr1=new JButton("Clear"); clr1.setBounds(255,340,80,20); clr1.addActionListener(this); p1.add(clr1); close1=new JButton("Close"); close1.setBounds(405,340,80,20); close1.addActionListener(this); p1.add(close1);

142

Project Report //Button defined for p2 show2=new JButton("Show"); show2.setBounds(30,340,80,20); show2.addActionListener(this); p2.add(show2); ok2=new JButton("Update"); ok2.setBounds(180,340,80,20); ok2.setEnabled(false); ok2.addActionListener(this); p2.add(ok2); clr2=new JButton("Clear"); clr2.setBounds(320,340,80,20); clr2.setEnabled(false); clr2.addActionListener(this); p2.add(clr2); close2=new JButton("Close"); close2.setBounds(470,340,80,20); close2.addActionListener(this); p2.add(close2); //button defined for p3 close3=new JButton("Close"); close3.setBounds(280,110,80,20); close3.addActionListener(this); p3.add(close3); del=new JButton("Delete"); del.setBounds(170,110,80,20); del.addActionListener(this); p3.add(del); //button defined for p4 close4=new JButton("Close"); close4.setBounds(280,110,80,20); close4.addActionListener(this); p4.add(close4); search=new JButton("Search"); search.setBounds(170,110,80,20); search.addActionListener(this);

Job Placement Agency

143

Project Report p4.add(search);

Job Placement Agency

//Table Created dtm=new DefaultTableModel(head,0); tab=new JTable(dtm); tab.setBounds(0,420,590,130); cn.add(tab); sp=new JScrollPane(tab,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp.setBounds(0,420,590,130); cn.add(sp); } public void actionPerformed(ActionEvent ae) { if(ae.getSource()==ok1) { try { String cstr,id=tcid.getText(); int flag=0; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs1=st.executeQuery("select* from candidate"); while(rs1.next()==true) { cstr=rs1.getString(1); if(cstr.equals(id)) { flag=1; } } if(flag==1) { st.executeUpdate("insert into registration values('"+tcid.getText()+"','"+trid.getText()+"', '"+tp_fee.getText()+"','"+td_fee.getText() +"','"+tt_fee.getText()+"')"); arr[0]=tcid.getText();

144

Project Report arr[1]=trid.getText(); arr[2]=tp_fee.getText(); arr[3]=td_fee.getText(); arr[4]=tt_fee.getText(); dtm.addRow(arr); con.close(); trid.setText(""); tp_fee.setText(""); td_fee.setText(""); tt_fee.setText(""); tcid.setText(""); tcid.requestFocus(); } else {

Job Placement Agency

JOptionPane.showMessageDialog(null,"Candidate Record not found","Warning Message", JOptionPane.WARNING_MESSAGE); } con.close(); } catch(Exception E) { JOptionPane.showMessageDialog(null,"Duplicate or Null value not allowed","Warning Message", JOptionPane.WARNING_MESSAGE); } } if(ae.getSource()==clr1) { trid.setText(""); tp_fee.setText(""); td_fee.setText(""); tt_fee.setText(""); tcid.setText(""); } if(ae.getSource()==close1) { frm.dispose(); Jps.i=0; }

145

Project Report

Job Placement Agency

if(ae.getSource()==show2) { try { String id=""+trid1.getText(); String cstr; int flag=0; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs1=st.executeQuery("select* from registration"); while(rs1.next()==true) { cstr=rs1.getString(2); if(cstr.equals(id)) { flag=1; } } if(flag==1) { ResultSet rs=st.executeQuery("select* from registration where reg_ID='"+id+"'"); while(rs.next()==true) { tcid1.setText(rs.getString(1)); tp_fee1.setText(rs.getString(3)); td_fee1.setText(rs.getString(4)); tt_fee1.setText(rs.getString(5)); p_fee1.setEnabled(true); d_fee1.setEnabled(true); t_fee1.setEnabled(true); cid1.setEnabled(true); tp_fee1.setEnabled(true); td_fee1.setEnabled(true); tt_fee1.setEnabled(true); umsg.setVisible(false); tcid1.setEnabled(true); ok2.setEnabled(true);

146

Project Report

Job Placement Agency clr2.setEnabled(true); } } else { JOptionPane.showMessageDialog(null,"Record not found","Warning Message", JOptionPane.WARNING_MESSAGE); } con.close(); } catch(Exception E) { System.out.println(E.getMessage()); }

} if(ae.getSource()==ok2) { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); st.executeUpdate("update registration set reg_id='"+trid1.getText() +"',paid_fee='"+ tp_fee1.getText()+"',due_fee='"+td_fee1.getText()+"', total_fee='"+tt_fee1.getText()+"' where c_id='"+tcid1.getText()+"'"); arr[0]=tcid1.getText(); arr[1]=trid1.getText(); arr[2]=tp_fee1.getText(); arr[3]=td_fee1.getText(); arr[4]=tt_fee1.getText(); dtm.addRow(arr); con.close(); trid1.setText(""); tp_fee1.setText(""); td_fee1.setText("");

147

Project Report tt_fee1.setText(""); tcid1.setText(""); trid1.requestFocus(); tp_fee1.setEnabled(false); td_fee1.setEnabled(false); tt_fee1.setEnabled(false); tcid1.setEnabled(false); ok2.setEnabled(false); clr2.setEnabled(false); umsg.setVisible(true);

Job Placement Agency

} catch(Exception E) { System.out.println(E.getMessage()); } } if(ae.getSource()==clr2) { trid1.setText(""); tp_fee1.setText(""); td_fee1.setText(""); tt_fee1.setText(""); tcid1.setText(""); tp_fee1.setEnabled(false); td_fee1.setEnabled(false); tt_fee1.setEnabled(false); tcid1.setEnabled(false); ok2.setEnabled(false); clr2.setEnabled(false); } if(ae.getSource()==close2) { frm.dispose(); Jps.i=0; } if(ae.getSource()==close3) { frm.dispose(); Jps.i=0;

148

Project Report

Job Placement Agency

} if(ae.getSource()==close4) { frm.dispose(); Jps.i=0; } if(ae.getSource()==del) { try { String cstr; int flag=0; String id=""+tdid.getText(); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs1=st.executeQuery("select* from registration"); while(rs1.next()==true) { cstr=rs1.getString(2); if(cstr.equals(id)) { flag=1; } } if(flag==1) { int response=JOptionPane.showConfirmDialog (null,"this will Delete the Record"+"\nwant to Delete it?","Information",JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if(response==0) { st.executeUpdate("delete from registration where reg_ID='"+id+"'"); tdid.setText(""); }

149

Project Report else tdid.setText(""); } else {

Job Placement Agency

JOptionPane.showMessageDialog(null,"Record not found","Warning Message", JOptionPane.WARNING_MESSAGE); } con.close(); tdid.requestFocus(); } catch(Exception e) { System.out.println(e.getMessage()); } } if(ae.getSource()==search) { try { String cstr; int flag=0; String id=""+tsid.getText(); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs1=st.executeQuery("select* from registration"); while(rs1.next()==true) { cstr=rs1.getString(2); if(cstr.equals(id)) { flag=1; } } if(flag==1) { ResultSet rs=st.executeQuery("select * from registration where reg_ID='"+id+"'"); while(rs.next()==true)

150

Project Report {

Job Placement Agency

arr[0]=rs.getString(1); arr[1]=rs.getString(2); arr[2]=rs.getString(3); arr[3]=rs.getString(4); arr[4]=rs.getString(5); dtm.addRow(arr); tsid.setText(""); } } else { JOptionPane.showMessageDialog(null,"Record not found","Warning Message", JOptionPane.WARNING_MESSAGE); } con.close(); tsid.requestFocus(); } catch(Exception e) { System.out.println(e.getMessage()); } } } }

Registration Record Module:import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.border.*; import javax.swing.table.*; import javax.swing.*; import java.sql.*; public class RegistrationShow extends Jps implements ActionListener { static JInternalFrame frm; Container cn;

151

Project Report JTable tab; DefaultTableModel dtm; JScrollPane sp; BevelBorder bbr1; Color cl1,cl2,cl3; Font ft; JLabel umsg; JButton close1,show1;

Job Placement Agency

String head[]={"C_ID","Reg_ID","Paid Fee","Due Fee","Total Fee"}; String arr[]=new String[5]; public RegistrationShow(JDesktopPane dp) { //Color Defined cl1=new Color(152,150,184); cl2=new Color(213,212,226); cl3=new Color(197,223,247); //Font Defined ft=new Font("Atial",Font.BOLD|Font.ITALIC,14); //Internal Frame Defined frm=new JInternalFrame("JPA-[Registration Record ]" ,true,true,false,false); frm.setBounds(100,30,600,600); frm.setBackground(cl3); frm.setVisible(true); //Container Defined cn=frm.getContentPane(); cn.setLayout(null); dp.add(frm); //BevelBorder Defined bbr1=new BevelBorder(BevelBorder.RAISED); //Label Defined umsg=new JLabel("REGISTRATION RECORD",JLabel.CENTER); umsg.setBounds(170,10,180,20); umsg.setBackground(cl1); umsg.setFont(ft); umsg.setBorder(bbr1); umsg.setOpaque(true);

152

Project Report cn.add(umsg); //Button Defined close1=new JButton("Close"); close1.setBounds(90,460,80,20); close1.addActionListener(this); cn.add(close1); show1=new JButton("Show"); show1.setBounds(5,460,80,20); show1.addActionListener(this); cn.add(show1);

Job Placement Agency

//Table Created dtm=new DefaultTableModel(head,0); tab=new JTable(dtm); tab.setBounds(5,50,580,400); cn.add(tab); sp=new JScrollPane(tab,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. _SCROLLBAR_AS_NEEDED); sp.setBounds(5,50,580,400); cn.add(sp); } public void actionPerformed(ActionEvent ae) { if(ae.getSource()==close1) { frm.dispose(); Jps.i=0; } if(ae.getSource()==show1) { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs=st.executeQuery("select * from registration");

153

Project Report while(rs.next()==true) { arr[0]=rs.getString(1); arr[1]=rs.getString(2); arr[2]=rs.getString(3); arr[3]=rs.getString(4); arr[4]=rs.getString(5); dtm.addRow(arr); } con.close(); } catch(Exception e) { System.out.println("Exception"); } } } }

Job Placement Agency

Report Module:import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.border.*; import javax.swing.table.*; import javax.swing.*; import java.sql.*; public class ReportModule extends Jps implements ActionListener { static JInternalFrame frm; Container cn; JTabbedPane tp; JPanel p1,p2,p3,p4; JTable tab; DefaultTableModel dtm; JScrollPane sp,sp1,sp2,sp3; LineBorder lbr1; TitledBorder tbr1,tbr2; BevelBorder bbr1; Color cl1,cl2,cl3;

154

Project Report

Job Placement Agency

JPanel p11,p12,p21,p22; //Inner Pane JTextField tid,tname,tcname,tdate,tid1,tname1,tcname1,tdate1,tdid,tscid; JTextArea tadd,tadd1,tadd2,tadd3; JButton ok1,clr1,close1,ok2,clr2,close2,close3,close4,show2,del,search; JLabel cid,cname,cstate,coname,date,cid1,cname1,cstate1, coname1,date1,did,scid,umsg,dmsg,smsg; //JRadioButton b1,b2,b3,b4,b5,b6,b7,b8; //ButtonGroup bg,bg1; JComboBox cb1,cb2,cb3,cb4,cb5,cb6; Font ft; String str,head[]={"C_ID","C_Name","State","DOJ","Company Name"}; String arr[]=new String[5]; public ReportModule(JDesktopPane dp) { //Color Defined cl1=new Color(152,150,184); cl2=new Color(213,212,226); cl3=new Color(197,223,247); //Font Defined ft=new Font("Arial",Font.BOLD|Font.ITALIC,14); //Internal Frame Defined frm=new JInternalFrame("JPA-[Report Module]",true,true,false,false); frm.setBounds(100,30,600,600); frm.setBackground(cl3); frm.setVisible(true); //Container Defined cn=frm.getContentPane(); cn.setLayout(null); dp.add(frm); //Border Defined //Line Border lbr1=new LineBorder(cl1); //Title Border tbr1=new TitledBorder(lbr1,"Personal Information"); tbr2=new TitledBorder(lbr1,"Educational Qualification"); //BevelBorder bbr1=new BevelBorder(BevelBorder.RAISED);

155

Project Report

Job Placement Agency

//Tabbed Pane Defined tp=new JTabbedPane(); tp.setBounds(0,20,600,400); tp.setVisible(true); cn.add(tp); //Panels Defined p1=new JPanel(); p2=new JPanel(); p3=new JPanel(); p4=new JPanel(); //Panels Layout Defined p1.setLayout(null); p2.setLayout(null); p3.setLayout(null); p4.setLayout(null); //Panels Color Defined p1.setBackground(cl1); p2.setBackground(cl1); p3.setBackground(cl1); p4.setBackground(cl1); //tabbed Pane Contain the Panels tp.add("New Record",p1); tp.add("Update Record",p2); tp.add("Delete Record",p3); tp.add("Search Record",p4); //Inner Panels Defined for p1 p11=new JPanel(); p11.setLayout(null); p11.setBackground(cl2); p11.setBounds(10,10,570,130); p11.setBorder(tbr1); p11.setVisible(true); p1.add(p11); p12=new JPanel(); p12.setLayout(null); p12.setBackground(cl2); p12.setBounds(170,190,230,60); p12.setBorder(lbr1); p12.setVisible(true);

156

Project Report p1.add(p12); //Inner Panels Defined for p2 p21=new JPanel(); p21.setLayout(null); p21.setBackground(cl2); p21.setBounds(10,50,570,130); p21.setBorder(tbr1); p21.setVisible(true); p2.add(p21); p22=new JPanel(); p22.setLayout(null); p22.setBackground(cl2); p22.setBounds(170,230,230,60); p22.setBorder(lbr1); p22.setVisible(true); p2.add(p22); //Label Defined for save panel p1 cid=new JLabel("Candidate ID"); cid.setBounds(10,30,100,20); p11.add(cid); cname=new JLabel("Candidate Name"); cname.setBounds(280,30,100,20); p11.add(cname); cstate=new JLabel("State"); cstate.setBounds(10,70,100,20); p11.add(cstate); date=new JLabel("Date Of Joining"); date.setBounds(280,70,100,20); date.setEnabled(false); p11.add(date); coname=new JLabel("Company Name"); coname.setBounds(10,20,100,20); coname.setEnabled(false); p12.add(coname);

Job Placement Agency

157

Project Report //Label Defined for save panel p2 cid1=new JLabel("Candidate ID"); cid1.setBounds(10,30,100,20); p21.add(cid1); cname1=new JLabel("Candidate Name"); cname1.setBounds(280,30,100,20); cname1.setEnabled(false); p21.add(cname1); cstate1=new JLabel("State"); cstate1.setBounds(10,70,100,20); cstate1.setEnabled(false); p21.add(cstate1); date1=new JLabel("Date Of Joining"); date1.setBounds(280,70,100,20); date1.setEnabled(false); p21.add(date1); coname1=new JLabel("Company Name"); coname1.setBounds(10,20,100,20); coname1.setEnabled(false); p22.add(coname1);

Job Placement Agency

umsg=new JLabel("Enter the Candidate ID which you want to update & click Show button",JLabel.CENTER); umsg.setBounds(50,10,500,20); umsg.setBackground(cl3); umsg.setFont(ft); umsg.setBorder(bbr1); umsg.setOpaque(true); p2.add(umsg); //Label Defined for delete panel p3 did=new JLabel("Candidate ID"); did.setBounds(190,60,80,20); p3.add(did); dmsg=new JLabel("Enter the Candidate ID which you want to Delete",JLabel.CENTER); dmsg.setBounds(120,20,340,20); dmsg.setBackground(cl3); dmsg.setFont(ft);

158

Project Report dmsg.setBorder(bbr1); dmsg.setOpaque(true); p3.add(dmsg); //Label Defined for search panel p4 scid=new JLabel("Candidate ID"); scid.setBounds(190,60,80,20); p4.add(scid);

Job Placement Agency

smsg=new JLabel("Enter the Candidate ID which you want to Search",JLabel.CENTER); smsg.setBounds(120,20,340,20); smsg.setBackground(cl3); smsg.setFont(ft); smsg.setBorder(bbr1); smsg.setOpaque(true); p4.add(smsg); //TextField Defined for save panel p1 tid=new JTextField(); tid.setBounds(110,30,110,20); p11.add(tid); tname=new JTextField(); tname.setBounds(410,30,110,20); p11.add(tname); tdate=new JTextField(); tdate.setBounds(520,70,40,20); tdate.setEnabled(false); p11.add(tdate); tcname=new JTextField(); tcname.setBounds(110,20,110,20); tcname.setEnabled(false); p12.add(tcname); //TextField Defined for save panel p2 tid1=new JTextField(); tid1.setBounds(110,30,110,20); p21.add(tid1); tname1=new JTextField();

159

Project Report tname1.setBounds(410,30,110,20); tname1.setEnabled(false); p21.add(tname1); tdate1=new JTextField(); tdate1.setBounds(520,70,40,20); tdate1.setEnabled(false); p21.add(tdate1); tcname1=new JTextField(); tcname1.setBounds(110,20,110,20); tcname1.setEnabled(false); p22.add(tcname1); //TextField Defined for delete panel p3 tdid=new JTextField(); tdid.setBounds(290,60,80,20); p3.add(tdid); //TextField Defined for search panel p4 tscid=new JTextField(); tscid.setBounds(290,60,80,20); p4.add(tscid); //ComboBox Defined for p1 cb1=new JComboBox (); cb2=new JComboBox (); cb3=new JComboBox (); cb1.setBounds(110,70,100,20); cb2.setBounds(410,70,40,20); cb3.setBounds(460,70,50,20); cb1.addActionListener(this); cb2.setEnabled(false); cb3.setEnabled(false); cb1.addItem("Not Selected"); cb1.addItem("Selected"); cb2.addItem(""); for(i=1;i<=31;i++) { str=i+""; cb2.addItem(str);

Job Placement Agency

160

Project Report } cb3.addItem(""); cb3.addItem("Jan"); cb3.addItem("Feb"); cb3.addItem("Mar"); cb3.addItem("April"); cb3.addItem("May"); cb3.addItem("Jun"); cb3.addItem("July"); cb3.addItem("Aug"); cb3.addItem("Sep"); cb3.addItem("Oct"); cb3.addItem("Nov"); cb3.addItem("Dec"); p11.add(cb1); p11.add(cb2); p11.add(cb3); //ComboBox Defined for p2 cb4=new JComboBox (); cb5=new JComboBox (); cb6=new JComboBox (); cb4.setBounds(110,70,100,20); cb5.setBounds(410,70,40,20); cb6.setBounds(460,70,50,20); cb4.addActionListener(this); cb4.setEnabled(false); cb5.setEnabled(false); cb6.setEnabled(false); cb4.addItem("NotSelected"); cb4.addItem("Selected"); cb5.addItem(""); for(i=1;i<=31;i++) { str=i+""; cb5.addItem(str); } cb6.addItem("");

Job Placement Agency

161

Project Report cb6.addItem("Jan"); cb6.addItem("Feb"); cb6.addItem("Mar"); cb6.addItem("April"); cb6.addItem("May"); cb6.addItem("Jun"); cb6.addItem("July"); cb6.addItem("Aug"); cb6.addItem("Sep"); cb6.addItem("Oct"); cb6.addItem("Nov"); cb6.addItem("Dec"); p21.add(cb4); p21.add(cb5); p21.add(cb6); //Button defined for p1 ok1=new JButton("Save"); ok1.setBounds(105,340,80,20); ok1.addActionListener(this); p1.add(ok1); clr1=new JButton("Clear"); clr1.setBounds(255,340,80,20); clr1.addActionListener(this); p1.add(clr1); close1=new JButton("Close"); close1.setBounds(405,340,80,20); close1.addActionListener(this); p1.add(close1); //Button defined for p2 show2=new JButton("Show"); show2.setBounds(30,340,80,20); show2.addActionListener(this); p2.add(show2); ok2=new JButton("Update"); ok2.setBounds(180,340,80,20); ok2.setEnabled(false); ok2.addActionListener(this); p2.add(ok2);

Job Placement Agency

162

Project Report

Job Placement Agency

clr2=new JButton("Clear"); clr2.setBounds(320,340,80,20); clr2.setEnabled(false); clr2.addActionListener(this); p2.add(clr2); close2=new JButton("Close"); close2.setBounds(470,340,80,20); close2.addActionListener(this); p2.add(close2); //button defined for p3 close3=new JButton("Close"); close3.setBounds(290,110,80,20); close3.addActionListener(this); p3.add(close3); del=new JButton("Delete"); del.setBounds(180,110,80,20); del.addActionListener(this); p3.add(del); //button defined for p4 close4=new JButton("Close"); close4.setBounds(290,110,80,20); close4.addActionListener(this); p4.add(close4); search=new JButton("Search"); search.setBounds(180,110,80,20); search.addActionListener(this); p4.add(search); //Table Created dtm=new DefaultTableModel(head,0); tab=new JTable(dtm); tab.setBounds(0,420,590,130); cn.add(tab); sp2=new JScrollPane(tab,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp2.setBounds(0,420,590,130); cn.add(sp2);

163

Project Report

Job Placement Agency

} public void actionPerformed(ActionEvent ae) { if(ae.getSource()==cb1) { if(cb1.getSelectedIndex()==1) { date.setEnabled(true); coname.setEnabled(true); tcname.setEnabled(true); tdate.setEnabled(true); cb2.setEnabled(true); cb3.setEnabled(true); } else { cb2.setSelectedItem(""); cb3.setSelectedItem(""); tcname.setText(""); tdate.setText(""); date.setEnabled(false); coname.setEnabled(false); tdate.setEnabled(false); cb2.setEnabled(false); cb3.setEnabled(false); } } if(ae.getSource()==ok1) { try { String cstr,cstr1,id=tid.getText(),name=tname.getText(); int flag=0,flag1=0; String DOJ=""+cb2.getSelectedItem()+"/"+ cb3.getSelectedItem()+"/"+tdate.getText(); String ste=""+cb1.getSelectedItem(); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system";

164

Project Report

Job Placement Agency Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs1=st.executeQuery("select* from candidate"); while(rs1.next()==true) { cstr=rs1.getString(1); cstr1=rs1.getString(2); if(cstr.equals(id)) { flag=1; } if(cstr1.equals(name)) { flag1=1; } } if(flag==1 && flag1==1) { st.executeUpdate("insert into report values('"+tid.getText() +"', '"+tname.getText()+"', '"+ste+"','"+DOJ+"', '"+tcname.getText()+"')"); arr[0]=tid.getText(); arr[1]=tname.getText(); arr[2]=ste; arr[3]=DOJ; arr[4]=tcname.getText(); dtm.addRow(arr); con.close(); tid.setText(""); tname.setText(""); tdate.setText(""); tcname.setText(""); cb1.setSelectedIndex(0); cb2.setSelectedIndex(0); cb3.setSelectedIndex(0); tid.requestFocus(); } else { if(flag==0)

165

Project Report

Job Placement Agency

JOptionPane.showMessageDialog (null,"Candidate ID not found","Warning Message",JOptionPane.WARNING_MESSAGE); else JOptionPane.showMessageDialog (null,"Candidate Name is invalid","Warning Message",JOptionPane.WARNING_MESSAGE); } } catch(Exception E) { System.out.println(E.getMessage()); } } if(ae.getSource()==clr1) { tid.setText(""); tname.setText(""); tdate.setText(""); tcname.setText(""); cb1.setSelectedIndex(0); cb2.setSelectedIndex(0); cb2.setSelectedIndex(0); tid.requestFocus(); } if(ae.getSource()==close1) { frm.dispose(); Jps.i=0; } if(ae.getSource()==show2) { try { String id=""+tid1.getText(); String cstr; int flag=0;

166

Project Report

Job Placement Agency Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs1=st.executeQuery("select* from report"); while(rs1.next()==true) { cstr=rs1.getString(1); if(cstr.equals(id)) { flag=1; } } if(flag==1) { ResultSet rs=st.executeQuery("select* from report where candidate_ID='"+id+"'"); while(rs.next()==true) { tname1.setText(rs.getString(2)); cb4.setSelectedItem(rs.getString(3)); String s[]=rs.getString(4).split("/"); cb5.setSelectedItem(s[0]); cb6.setSelectedItem(s[1]); tdate1.setText(s[2]); tcname1.setText(rs.getString(5)); cname1.setEnabled(true); date1.setEnabled(true); cstate1.setEnabled(true); coname1.setEnabled(true); tname1.setEnabled(true); tdate1.setEnabled(true); tcname1.setEnabled(true); cb4.setEnabled(true); cb5.setEnabled(true); cb6.setEnabled(true); ok2.setEnabled(true); clr2.setEnabled(true); umsg.setVisible(false);

167

Project Report } } else {

Job Placement Agency

JOptionPane.showMessageDialog(null,"Record not found","Warning Message", JOptionPane.WARNING_MESSAGE); } con.close(); } catch(Exception E) { System.out.println(E.getMessage()); } } if(ae.getSource()==cb4) { if(cb4.getSelectedIndex()==0) { cb5.setSelectedItem(""); cb6.setSelectedItem(""); tcname1.setText(""); tdate1.setText(""); date1.setEnabled(false); coname1.setEnabled(false); tdate1.setEnabled(false); tcname1.setEnabled(false); cb5.setEnabled(false); cb6.setEnabled(false); cb4.setEnabled(true); cstate1.setEnabled(true); tname1.setEnabled(true); cname1.setEnabled(true); } else {

168

Project Report cname1.setEnabled(true); date1.setEnabled(true); coname1.setEnabled(true); tname1.setEnabled(true); tdate1.setEnabled(true); tcname1.setEnabled(true); cb5.setEnabled(true); cb6.setEnabled(true);

Job Placement Agency

} } if(ae.getSource()==ok2) { try { String DOJ=""+cb5.getSelectedItem()+"/"+ cb6.getSelectedItem()+"/"+tdate1.getText(); String ste=""+cb4.getSelectedItem(); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); st.executeUpdate("update report set candidate_name='"+tname1.getText()+"', state='"+ste+"',doj='"+DOJ+"', company_name='"+tcname1.getText()+"' where candidate_id='"+tid1.getText()+"'"); arr[0]=tid1.getText(); arr[1]=tname1.getText(); arr[2]=ste; arr[3]=DOJ; arr[4]=tcname1.getText(); dtm.addRow(arr); con.close(); tid1.setText(""); tname1.setText(""); tdate1.setText(""); tcname1.setText(""); cb4.setSelectedIndex(0); cb5.setSelectedIndex(0);

169

Project Report cb6.setSelectedIndex(0); tid1.requestFocus(); cname1.setEnabled(false); cstate1.setEnabled(false); tname1.setEnabled(false); tdate1.setEnabled(false); tcname1.setEnabled(false); cb4.setEnabled(false); cb5.setEnabled(false); cb6.setEnabled(false); ok2.setEnabled(false); clr2.setEnabled(false); umsg.setVisible(true);

Job Placement Agency

} catch(Exception E) { System.out.println(E.getMessage()); } } if(ae.getSource()==clr2) { tid1.setText(""); tname1.setText(""); tdate1.setText(""); tcname1.setText(""); cb4.setSelectedIndex(0); cb5.setSelectedIndex(0); cb6.setSelectedIndex(0); cb4.setEnabled(false); cname1.setEnabled(false); tname1.setEnabled(false); ok2.setEnabled(false); clr2.setEnabled(false); } if(ae.getSource()==close2) { frm.dispose(); Jps.i=0;

170

Project Report } if(ae.getSource()==close3) { frm.dispose(); Jps.i=0; } if(ae.getSource()==close4) { frm.dispose(); Jps.i=0;

Job Placement Agency

} if(ae.getSource()==del) { try { String cstr; int flag=0; String id=""+tdid.getText(); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs1=st.executeQuery("select* from report"); while(rs1.next()==true) { cstr=rs1.getString(1); if(cstr.equals(id)) { flag=1; } } if(flag==1) { int response=JOptionPane.showConfirmDialog (null,"this will Delete the Record"+"\nwant to Delete it?","Information",JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if(response==0) {

171

Project Report

Job Placement Agency st.executeUpdate("delete from report where candidate_ID='"+id+"'"); tdid.setText(""); } else tdid.setText(""); } else { JOptionPane.showMessageDialog(null,"Record not found","Warning Message", JOptionPane.WARNING_MESSAGE); } con.close(); tdid.requestFocus(); } catch(Exception e) { System.out.println(e.getMessage()); }

} if(ae.getSource()==search) { try { String cstr; int flag=0; String id=""+tscid.getText(); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs1=st.executeQuery("select* from report"); while(rs1.next()==true) { cstr=rs1.getString(1); if(cstr.equals(id)) { flag=1; }

172

Project Report

Job Placement Agency } if(flag==1) { ResultSet rs=st.executeQuery("select * from report where candidate_ID='"+id+"'"); while(rs.next()==true) { arr[0]=rs.getString(1); arr[1]=rs.getString(2); arr[2]=rs.getString(3); arr[3]=rs.getString(4); arr[4]=rs.getString(5); dtm.addRow(arr); tscid.setText(""); } } else { JOptionPane.showMessageDialog(null,"Record not found","Warning Message", JOptionPane.WARNING_MESSAGE); } con.close(); tscid.requestFocus(); } catch(Exception e) { System.out.println(e.getMessage()); }

} } }

173

Project Report

Job Placement Agency

Report Record Module:import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.border.*; import javax.swing.table.*; import javax.swing.*; import java.sql.*; public class ReportShow extends Jps implements ActionListener { static JInternalFrame frm; Container cn; JTable tab; DefaultTableModel dtm; JScrollPane sp; BevelBorder bbr1; Color cl1,cl2,cl3; Font ft; JLabel umsg; JButton close1,show1; String head[]={"C_ID","C_Name","State","DOJ","Company Name"}; String arr[]=new String[9]; public ReportShow(JDesktopPane dp) { //Color Defined cl1=new Color(152,150,184); cl2=new Color(213,212,226); cl3=new Color(197,223,247); //Font Defined ft=new Font("Atial",Font.BOLD|Font.ITALIC,14); //Internal Frame Defined frm=new JInternalFrame("JPA-[Report Record ]",true,true,false,false); frm.setBounds(100,30,600,600); frm.setBackground(cl3); frm.setVisible(true); //Container Defined

174

Project Report cn=frm.getContentPane(); cn.setLayout(null); dp.add(frm); //BevelBorder Defined bbr1=new BevelBorder(BevelBorder.RAISED);

Job Placement Agency

//Label Defined umsg=new JLabel("REPORT RECORD",JLabel.CENTER); umsg.setBounds(200,10,150,20); umsg.setBackground(cl1); umsg.setFont(ft); umsg.setBorder(bbr1); umsg.setOpaque(true); cn.add(umsg); //Button Defined close1=new JButton("Close"); close1.setBounds(90,460,80,20); close1.addActionListener(this); cn.add(close1); show1=new JButton("Show"); show1.setBounds(5,460,80,20); show1.addActionListener(this); cn.add(show1); //Table Created dtm=new DefaultTableModel(head,0); tab=new JTable(dtm); tab.setBounds(5,50,580,400); cn.add(tab); sp=new JScrollPane(tab,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp.setBounds(5,50,580,400); cn.add(sp); } public void actionPerformed(ActionEvent ae) { if(ae.getSource()==close1) { frm.dispose();

175

Project Report Jps.i=0;

Job Placement Agency

} if(ae.getSource()==show1) { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String str1="system"; String str2="system"; Connection con=DriverManager.getConnection ("jdbc:odbc:ff",str1,str2); Statement st=con.createStatement(); ResultSet rs=st.executeQuery("select * from report"); while(rs.next()==true) { arr[0]=rs.getString(1); arr[1]=rs.getString(2); arr[2]=rs.getString(3); arr[3]=rs.getString(4); arr[4]=rs.getString(5); dtm.addRow(arr); } con.close(); } catch(Exception e) { System.out.println("Exception"); } } } }

176

Project Report

Job Placement Agency

Help(JPA) Module:import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.border.*; import javax.swing.table.*; import javax.swing.*; public class AboutAgency extends Jps implements ActionListener { static JInternalFrame frm; Container cn; JTabbedPane tp; JPanel p1,p2,p3,p4,p5,p6; JTable tab; LineBorder lbr1; TitledBorder tbr1,tbr2,tbr3; Color cl1,cl2,cl3; Font ft; BevelBorder bbr1; JLabel l1,lp1,lp2,lp3,lp4,l21,lp21,lp22,lp23,lp24,l31,lp31,lp32,lp33,lp34,l41,lp41, lp42,lp43,lp44,l51,lp51,lp52,lp53,lp54,l61,lp61,lp62,lp63,lp64; JTextArea jlp1,jlp2,jlp3,jlp4,jlp21,jlp22,jlp23,jlp24,jlp31,jlp32,jlp33,jlp34,jlp41, jlp42,jlp43,jlp44,jlp51,jlp52,jlp53,jlp54,jlp61,jlp62,jlp63,jlp64; JScrollPane sp1,sp2,sp3,sp4,sp21,sp22,sp23,sp24,sp31,sp32,sp33,sp34,sp41, sp42,sp43,sp44,sp51,sp52,sp53,sp54,sp61,sp62,sp63,sp64; JButton close1,close2,close3,close4,close5,close6; public AboutAgency(JDesktopPane dp) { //Color Defined cl1=new Color(152,150,184); cl2=new Color(213,212,226); cl3=new Color(197,223,247); //font defined ft=new Font("Arial",Font.BOLD|Font.ITALIC,12); //border Defined

177

Project Report bbr1=new BevelBorder(BevelBorder.RAISED);

Job Placement Agency

//Internal Frame Defined frm=new JInternalFrame("JPA-[Help Module]",true,true,false,false); frm.setBounds(100,30,750,700); frm.setBackground(cl3); frm.setVisible(true); //Container Defined cn=frm.getContentPane(); cn.setLayout(null); dp.add(frm); //Tabbed Pane Defined tp=new JTabbedPane(); tp.setBounds(0,20,750,650); tp.setVisible(true); cn.add(tp); //Panels Defined p1=new JPanel(); p2=new JPanel(); p3=new JPanel(); p4=new JPanel(); p5=new JPanel(); p6=new JPanel(); //Panels Layout Defined p1.setLayout(null); p2.setLayout(null); p3.setLayout(null); p4.setLayout(null); p5.setLayout(null); p6.setLayout(null); //Panels Color Defined p1.setBackground(cl1); p2.setBackground(cl1); p3.setBackground(cl1); p4.setBackground(cl1); p5.setBackground(cl1); p6.setBackground(cl1); //tabbed Pane Contain the Panels tp.add("Staff Module",p1); tp.add("Candidate Module",p2);

178

Project Report tp.add("Vacancy Module",p3); tp.add("Source Module",p4); tp.add("Registration Module",p5); tp.add("Report Module",p6);

Job Placement Agency

//Label Defined for p1 l1=new JLabel(" If you want to be aware of this application please read carefully this whole information which have a lot of knowledge. "); lp1=new JLabel("STAFF SAVE"); lp2=new JLabel("STAFF UPDATE"); lp3=new JLabel("STAFF DELETE"); lp4=new JLabel("STAFF SEARCH"); l1.setOpaque(true); lp1.setOpaque(true); lp2.setOpaque(true); lp3.setOpaque(true); lp4.setOpaque(true); l1.setBackground(cl3); lp1.setBackground(cl2); lp2.setBackground(cl2); lp3.setBackground(cl2); lp4.setBackground(cl2); l1.setBorder(bbr1); lp1.setBorder(bbr1); lp2.setBorder(bbr1); lp3.setBorder(bbr1); lp4.setBorder(bbr1); l1.setFont(ft); lp1.setFont(ft); lp2.setFont(ft); lp3.setFont(ft); lp4.setFont(ft); l1.setBounds(5,10,680,20); lp1.setBounds(5,50,740,20); lp2.setBounds(5,190,740,20); lp3.setBounds(5,330,740,20); lp4.setBounds(5,470,740,20); p1.add(l1);

179

Project Report p1.add(lp1); p1.add(lp2); p1.add(lp3); p1.add(lp4);

Job Placement Agency

//TextArea Defined for p1 jlp1=new JTextArea(" IF YOU WANT TO SAVE THE STAFF RECORD THEN "+"\n\n FILL THE WHOLE INFORMATION WHICH ARE SHOWING ON THE FORM"+"\n\n THEN CLICK ON SAVE BUTTON"); jlp1.setBounds(5,70,740,100); jlp1.setEditable(false); p1.add(jlp1); jlp2=new JTextArea(" TO UPDATE THE STAFF RECORD"+"\n\n FIRST OF ALL, ENTER THE STAFF ID THEN CLICK ON SHOW BUTTON"+"\n\n FURTHER EDIT THE PARTICULAR RECORD WHICH YOU WANT TO UPDATE"+"\n\n CLICK THE UPDATE BUTTON"); jlp2.setBounds(5,210,740,100); jlp2.setEditable(false); p1.add(jlp2); jlp3=new JTextArea(" TO DELETE THE STAFF RECORD"+"\n\n FIRST OF ALL ENTER THE STAFF ID THEN CLICK ON DELETE BUTTON "+"\n\n CLICK THE OK BUTTON ON MESSAGE DIALOG"); jlp3.setBounds(5,350,740,100); jlp3.setEditable(false); p1.add(jlp3); jlp4=new JTextArea(" TO SEARCH A PERTICULAR STAFF RECORD"+"\n\n FIRST OF ALL ENTER THE STAFF ID WHICH YOU WANT TO SEARCH"+"\n\n CLICK THE SEARCH BUTTON "+"\n\n RECORD WILL BE SHOWN ON THE TABLE"); jlp4.setBounds(5,490,740,100); jlp4.setEditable(false); p1.add(jlp4); //scrollPane Defined for p1 sp1=new JScrollPane(jlp1,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp1.setBounds(5,70,740,100);

180

Project Report p1.add(sp1);

Job Placement Agency

sp2=new JScrollPane(jlp2,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp2.setBounds(5,210,740,100); p1.add(sp2); sp3=new JScrollPane(jlp3,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp3.setBounds(5,350,740,100); p1.add(sp3); sp4=new JScrollPane(jlp4,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp4.setBounds(5,490,740,100); p1.add(sp4); //Button Defined for p1 close1=new JButton("Close"); close1.setBounds(680,30,70,20); close1.addActionListener(this); p1.add(close1); //Label Defined for p2 l21=new JLabel(" If you want to be aware of this application please read carefully this whole information which have a lot of knowledge. "); lp21=new JLabel("CANDIDATE SAVE"); lp22=new JLabel("CANDIDATE UPDATE"); lp23=new JLabel("CANDIDATE DELETE"); lp24=new JLabel("CANDIDATE SEARCH"); l21.setOpaque(true); lp21.setOpaque(true); lp22.setOpaque(true); lp23.setOpaque(true); lp24.setOpaque(true); l21.setBackground(cl3); lp21.setBackground(cl2); lp22.setBackground(cl2);

181

Project Report lp23.setBackground(cl2); lp24.setBackground(cl2); l21.setBorder(bbr1); lp21.setBorder(bbr1); lp22.setBorder(bbr1); lp23.setBorder(bbr1); lp24.setBorder(bbr1); l21.setFont(ft); lp21.setFont(ft); lp22.setFont(ft); lp23.setFont(ft); lp24.setFont(ft); l21.setBounds(5,10,680,20); lp21.setBounds(5,50,740,20); lp22.setBounds(5,190,740,20); lp23.setBounds(5,330,740,20); lp24.setBounds(5,470,740,20); p2.add(l21); p2.add(lp21); p2.add(lp22); p2.add(lp23); p2.add(lp24);

Job Placement Agency

//TextArea Defined for p2 jlp21=new JTextArea(" IF YOU WANT TO SAVE THE CANDIDATE RECORD THEN "+"\n\n FILL THE WHOLE INFORMATION WHICH ARE SHOWING ON THE FORM"+"\n\n THEN CLICK ON SAVE BUTTON"); jlp21.setBounds(5,70,740,100); jlp21.setEditable(false); p2.add(jlp21); jlp22=new JTextArea(" TO UPDATE THE CANDIDATE RECORD"+"\n\n FIRST OF ALL, ENTER THE CANDIDATE ID THEN CLICK ON SHOW BUTTON"+"\n\n FURTHER EDIT THE PARTICULAR RECORD WHICH YOU WANT TO UPDATE"+"\n\n CLICK THE UPDATE BUTTON"); jlp22.setBounds(5,210,740,100); jlp22.setEditable(false); p2.add(jlp22);

182

Project Report

Job Placement Agency

jlp23=new JTextArea(" TO DELETE THE CANDIDATE RECORD"+"\n\n FIRST OF ALL ENTER THE CANDIDATE ID THEN CLICK ON DELETE BUTTON "+"\n\n CLICK THE OK BUTTON ON MESSAGE DIALOG"); jlp23.setBounds(5,350,740,100); jlp23.setEditable(false); p2.add(jlp23); jlp24=new JTextArea(" TO SEARCH A PERTICULAR CANDIDATE RECORD"+"\n\n FIRST OF ALL ENTER THE CANDIDATE ID WHICH YOU WANT TO SEARCH"+"\n\n CLICK THE SEARCH BUTTON"+"\n\n RECORD WILL BE SHOWN ON THE TABLE"); jlp24.setBounds(5,490,740,100); jlp24.setEditable(false); p2.add(jlp24); //scrollPane Defined for p2 sp21=new JScrollPane(jlp21,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp21.setBounds(5,70,740,100); p2.add(sp21); sp22=new JScrollPane(jlp22,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp22.setBounds(5,210,740,100); p2.add(sp22); sp23=new JScrollPane(jlp23,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp23.setBounds(5,350,740,100); p2.add(sp23); sp24=new JScrollPane(jlp24,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp24.setBounds(5,490,740,100); p2.add(sp24); //Button Defined for p2 close2=new JButton("Close");

183

Project Report close2.setBounds(680,30,70,20); close2.addActionListener(this); p2.add(close2);

Job Placement Agency

//Label Defined for p3 l31=new JLabel(" If you want to be aware of this application please read carefully this whole information which have a lot of knowledge. "); lp31=new JLabel("VACANCY SAVE"); lp32=new JLabel("VACANCY UPDATE"); lp33=new JLabel("VACANCY DELETE"); lp34=new JLabel("VACANCY SEARCH"); l31.setOpaque(true); lp31.setOpaque(true); lp32.setOpaque(true); lp33.setOpaque(true); lp34.setOpaque(true); l31.setBackground(cl3); lp31.setBackground(cl2); lp32.setBackground(cl2); lp33.setBackground(cl2); lp34.setBackground(cl2); l31.setBorder(bbr1); lp31.setBorder(bbr1); lp32.setBorder(bbr1); lp33.setBorder(bbr1); lp34.setBorder(bbr1); l31.setFont(ft); lp31.setFont(ft); lp32.setFont(ft); lp33.setFont(ft); lp34.setFont(ft); l31.setBounds(5,10,680,20); lp31.setBounds(5,50,740,20); lp32.setBounds(5,190,740,20); lp33.setBounds(5,330,740,20); lp34.setBounds(5,470,740,20); p3.add(l31);

184

Project Report p3.add(lp31); p3.add(lp32); p3.add(lp33); p3.add(lp34);

Job Placement Agency

//TextArea Defined for p3 jlp31=new JTextArea(" IF YOU WANT TO SAVE THE VACANCY RECORD THEN "+"\n\n FILL THE WHOLE INFORMATION WHICH ARE SHOWING ON THE FORM"+"\n\n THEN CLICK ON SAVE BUTTON"); jlp31.setBounds(5,70,790,100); jlp31.setEditable(false); p3.add(jlp31); jlp32=new JTextArea(" TO UPDATE THE VACANCY RECORD"+"\n\n FIRST OF ALL, ENTER THE VACANCY ID THEN CLICK ON SHOW BUTTON"+"\n\n FURTHER EDIT THE PARTICULAR RECORD WHICH YOU WANT TO UPDATE"+"\n\n CLICK THE UPDATE BUTTON"); jlp32.setBounds(5,210,740,100); jlp32.setEditable(false); p3.add(jlp32); jlp33=new JTextArea(" TO DELETE THE VACANCY RECORD"+"\n\n FIRST OF ALL ENTER THE VACANCY ID THEN CLICK ON DELETE BUTTON "+"\n\n CLICK THE OK BUTTON ON MESSAGE DIALOG"); jlp33.setBounds(5,350,740,100); jlp33.setEditable(false); p3.add(jlp33); jlp34=new JTextArea(" TO SEARCH A PERTICULAR VACANCY RECORD"+"\n\n FIRST OF ALL ENTER THE VACANCY ID WHICH U WANT TO SEARCH"+"\n\n CLICK THE SEARCH BUTTON"+"\n\n RECORD WILL BE SHOWN ON THE TABLE"); jlp34.setBounds(5,490,740,100); jlp34.setEditable(false); p3.add(jlp34); //scrollPane Defined for p3 sp31=new JScrollPane(jlp31,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_ NEEDED); sp31.setBounds(5,70,790,100);

185

Project Report p3.add(sp31);

Job Placement Agency

sp32=new JScrollPane(jlp32,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_ NEEDED); sp32.setBounds(5,210,740,100); p3.add(sp32); sp33=new JScrollPane(jlp33,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_ NEEDED); sp33.setBounds(5,350,740,100); p3.add(sp33); sp34=new JScrollPane(jlp34,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_ NEEDED); sp34.setBounds(5,490,740,100); p3.add(sp34); //Button Defined for p3 close3=new JButton("Close"); close3.setBounds(680,30,70,20); close3.addActionListener(this); p3.add(close3); //Label Defined for p4 l41=new JLabel(" If you want to be aware of this application please read carefully this whole information which have a lot of knowledge. "); lp41=new JLabel("SOURCE SAVE"); lp42=new JLabel("SOURCE UPDATE"); lp43=new JLabel("SOURCE DELETE"); lp44=new JLabel("SOURCE SEARCH"); l41.setOpaque(true); lp41.setOpaque(true); lp42.setOpaque(true); lp43.setOpaque(true); lp44.setOpaque(true); l41.setBackground(cl3); lp41.setBackground(cl2); lp42.setBackground(cl2); lp43.setBackground(cl2);

186

Project Report lp44.setBackground(cl2); l41.setBorder(bbr1); lp41.setBorder(bbr1); lp42.setBorder(bbr1); lp43.setBorder(bbr1); lp44.setBorder(bbr1); l41.setFont(ft); lp41.setFont(ft); lp42.setFont(ft); lp43.setFont(ft); lp44.setFont(ft); l41.setBounds(5,10,680,20); lp41.setBounds(5,50,740,20); lp42.setBounds(5,190,740,20); lp43.setBounds(5,330,740,20); lp44.setBounds(5,470,740,20); p4.add(l41); p4.add(lp41); p4.add(lp42); p4.add(lp43); p4.add(lp44);

Job Placement Agency

//TextArea Defined for p4 jlp41=new JTextArea(" IF YOU WANT TO SAVE THE SOURCE RECORD THEN "+"\n\n FILL THE WHOLE INFORMATION WHICH ARE SHOWING ON THE FORM"+"\n\n THEN CLICK ON SAVE BUTTON"); jlp41.setBounds(5,70,740,100); jlp41.setEditable(false); p4.add(jlp41); jlp42=new JTextArea(" TO UPDATE THE SOURCE RECORD"+"\n\n FIRST OF ALL, ENTER THE SOURCE ID THEN CLICK ON SHOW BUTTON"+"\n\n FURTHER EDIT THE PARTICULAR RECORD WHICH YOU WANT TO UPDATE"+"\n\n CLICK THE UPDATE BUTTON"); jlp42.setBounds(5,210,740,100); jlp42.setEditable(false); p4.add(jlp42);

187

Project Report

Job Placement Agency

jlp43=new JTextArea(" TO DELETE THE SOURCE RECORD"+"\n\n FIRST OF ALL ENTER THE SOURCE ID THEN CLICK ON DELETE BUTTON "+"\n\n CLICK THE OK BUTTON ON MESSAGE DIALOG"); jlp43.setBounds(5,350,740,100); jlp43.setEditable(false); p4.add(jlp43); jlp44=new JTextArea(" TO SEARCH A PERTICULAR SOURCE RECORD"+"\n\n FIRST OF ALL ENTER THE SOURCE ID WHICH YOU WANT TO SEARCH"+"\n\n CLICK THE SEARCH BUTTON"+"\n\n RECORD WILL BE SHOWN ON THE TABLE"); jlp44.setBounds(5,490,740,100); jlp44.setEditable(false); p4.add(jlp44); //scrollPane Defined for p4 sp41=new JScrollPane(jlp41,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_ NEEDED); sp41.setBounds(5,70,740,100); p4.add(sp41); sp42=new JScrollPane(jlp42,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_ NEEDED); sp42.setBounds(5,210,740,100); p4.add(sp42); sp43=new JScrollPane(jlp43,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_ NEEDED); sp43.setBounds(5,350,740,100); p4.add(sp43); sp44=new JScrollPane(jlp44,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_ NEEDED); sp44.setBounds(5,490,740,100); p4.add(sp44); //Button Defined for p4 close4=new JButton("Close"); close4.setBounds(680,30,70,20); close4.addActionListener(this);

188

Project Report p4.add(close4);

Job Placement Agency

//Label Defined for p5 l51=new JLabel(" If you want to be aware of this application please read carefully this whole information which have a lot of knowledge. "); lp51=new JLabel("REGISTRATION SAVE"); lp52=new JLabel("REGISTRATION UPDATE"); lp53=new JLabel("REGISTRATION DELETE"); lp54=new JLabel("REGISTRATION SEARCH"); l51.setOpaque(true); lp51.setOpaque(true); lp52.setOpaque(true); lp53.setOpaque(true); lp54.setOpaque(true); l51.setBackground(cl3); lp51.setBackground(cl2); lp52.setBackground(cl2); lp53.setBackground(cl2); lp54.setBackground(cl2); l51.setBorder(bbr1); lp51.setBorder(bbr1); lp52.setBorder(bbr1); lp53.setBorder(bbr1); lp54.setBorder(bbr1); l51.setFont(ft); lp51.setFont(ft); lp52.setFont(ft); lp53.setFont(ft); lp54.setFont(ft); l51.setBounds(5,10,680,20); lp51.setBounds(5,50,740,20); lp52.setBounds(5,190,740,20); lp53.setBounds(5,330,740,20); lp54.setBounds(5,470,740,20); p5.add(l51); p5.add(lp51); p5.add(lp52); p5.add(lp53);

189

Project Report p5.add(lp54);

Job Placement Agency

//TextArea Defined for p5 jlp51=new JTextArea(" IF YOU WANT TO SAVE THE REGISTRATION RECORD THEN "+"\n\n FILL THE WHOLE INFORMATION WHICH ARE SHOWING ON THE FORM"+"\n\n THEN CLICK ON SAVE BUTTON"); jlp51.setBounds(5,70,740,100); jlp51.setEditable(false); p5.add(jlp51); jlp52=new JTextArea(" TO UPDATE THE REGISTRATION RECORD"+"\n\n FIRST OF ALL, ENTER THE REGISTRATION ID THEN CLICK ON SHOW BUTTON"+"\n\n FURTHER EDIT THE PARTICULAR RECORD WHICH YOU WANT TO UPDATE"+"\n\n CLICK THE UPDATE BUTTON"); jlp52.setBounds(5,210,740,100); jlp52.setEditable(false); p5.add(jlp52); jlp53=new JTextArea(" TO DELETE THE REGISTRATION RECORD"+"\n\n FIRST OF ALL ENTER THE REGISTRATION ID THEN CLICK ON DELETE BUTTON "+"\n\n CLICK THE OK BUTTON ON MESSAGE DIALOG"); jlp53.setBounds(5,350,740,100); jlp53.setEditable(false); p5.add(jlp53); jlp54=new JTextArea(" TO SEARCH A PERTICULAR REGISTRATION RECORD"+"\n\n FIRST OF ALL ENTER THE REGISTRATION ID WHICH YOU WANT TO SEARCH"+"\n\n CLICK THE SEARCH BUTTON"+"\n\n RECORD WILL BE SHOWN ON THE TABLE"); jlp54.setBounds(5,490,740,100); jlp54.setEditable(false); p5.add(jlp54); //scrollPane Defined for p5 sp51=new JScrollPane(jlp51,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_ NEEDED); sp51.setBounds(5,70,740,100); p5.add(sp51); sp52=new JScrollPane(jlp52,JScrollPane.VERTICAL_

190

Project Report

Job Placement Agency

SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_ NEEDED); sp52.setBounds(5,210,740,100); p5.add(sp52); sp53=new JScrollPane(jlp53,JScrollPane.VERTICAL_SCROLLBAR AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED) sp53.setBounds(5,350,740,100); p5.add(sp53); sp54=new JScrollPane(jlp54,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp54.setBounds(5,490,740,100); p5.add(sp54); //Button Defined for p5 close5=new JButton("Close"); close5.setBounds(680,30,70,20); close5.addActionListener(this); p5.add(close5); //Label Defined for p6 l61=new JLabel(" If you want to be aware of this application please read carefully this whole information which have a lot of knowledge. "); lp61=new JLabel("REPORT SAVE"); lp62=new JLabel("REPORT UPDATE"); lp63=new JLabel("REPORT DELETE"); lp64=new JLabel("REPORT SEARCH"); l61.setOpaque(true); lp61.setOpaque(true); lp62.setOpaque(true); lp63.setOpaque(true); lp64.setOpaque(true); l61.setBackground(cl3); lp61.setBackground(cl2); lp62.setBackground(cl2); lp63.setBackground(cl2); lp64.setBackground(cl2); l61.setBorder(bbr1);

191

Project Report lp61.setBorder(bbr1); lp62.setBorder(bbr1); lp63.setBorder(bbr1); lp64.setBorder(bbr1); l61.setFont(ft); lp61.setFont(ft); lp62.setFont(ft); lp63.setFont(ft); lp64.setFont(ft); l61.setBounds(5,10,680,20); lp61.setBounds(5,50,740,20); lp62.setBounds(5,190,740,20); lp63.setBounds(5,330,740,20); lp64.setBounds(5,470,740,20); p6.add(l61); p6.add(lp61); p6.add(lp62); p6.add(lp63); p6.add(lp64);

Job Placement Agency

//TextArea Defined for p6 jlp61=new JTextArea(" IF YOU WANT TO SAVE THE REPORT RECORD THEN "+"\n\n FILL THE WHOLE INFORMATION WHICH ARE SHOWING ON THE FORM"+"\n\n THEN CLICK ON SAVE BUTTON"); jlp61.setBounds(5,70,740,100); jlp61.setEditable(false); p6.add(jlp61); jlp62=new JTextArea(" TO UPDATE THE REPORT RECORD"+"\n\n FIRST OF ALL, ENTER THE CANDIDATE ID THEN CLICK ON SHOW BUTTON"+"\n\n FURTHER EDIT THE PARTICULAR RECORD WHICH YOU WANT TO UPDATE"+"\n\n CLICK THE UPDATE BUTTON"); jlp62.setBounds(5,210,740,100); jlp62.setEditable(false); p6.add(jlp62); jlp63=new JTextArea(" TO DELETE THE REPORT RECORD"+"\n\n FIRST OF ALL ENTER THE CANDIDATE ID THEN CLICK ON DELETE BUTTON "+"\n\n CLICK THE OK BUTTON ON MESSAGE DIALOG"); jlp63.setBounds(5,350,740,100); jlp63.setEditable(false);

192

Project Report p6.add(jlp63);

Job Placement Agency

jlp64=new JTextArea(" TO SEARCH A PERTICULAR REPORT RECORD"+"\n\n FIRST OF ALL ENTER THE CANDIDATE ID WHICH YOU WANT TO SEARCH"+"\n\n CLICK THE SEARCH BUTTON"+"\n\n RECORD WILL BE SHOWN ON THE TABLE"); jlp64.setBounds(5,490,740,100); jlp64.setEditable(false); p6.add(jlp64); //scrollPane Defined for p6 sp61=new JScrollPane(jlp61,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp61.setBounds(5,70,740,100); p6.add(sp61); sp62=new JScrollPane(jlp62,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp62.setBounds(5,210,740,100); p6.add(sp62); sp63=new JScrollPane(jlp63,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp63.setBounds(5,350,740,100); p6.add(sp63); sp64=new JScrollPane(jlp64,JScrollPane.VERTICAL_ SCROLLBAR_AS_NEEDED,JScrollPane. HORIZONTAL_SCROLLBAR_AS_NEEDED); sp64.setBounds(5,490,740,100); p6.add(sp64); //Button Defined for p6 close6=new JButton("Close"); close6.setBounds(680,30,70,20); close6.addActionListener(this); p6.add(close6); } public void actionPerformed(ActionEvent ae) {

193

Project Report if(ae.getSource()==close1) { frm.dispose(); Jps.i=0; } if(ae.getSource()==close2) { frm.dispose(); Jps.i=0; } if(ae.getSource()==close3) { frm.dispose(); Jps.i=0; } if(ae.getSource()==close4) { frm.dispose(); Jps.i=0; } if(ae.getSource()==close5) { frm.dispose(); Jps.i=0; } if(ae.getSource()==close6) { frm.dispose(); Jps.i=0; } } }

Job Placement Agency

194

Project Report

Job Placement Agency

SYSTEM TESTING

195

Project Report

Job Placement Agency

SYSTEM TESTING
We search error using testing process. When develop a software the main goals is to perform his define works or user requirement. when apply testing process we know that the software develop fulfill user requirement or not. TESTING OBJECTIVES: The main objective of testing is to uncover a host of errors, systematically and with minimum effort and time. Stating formally, we can say, Testing is a process of executing a program with the intent of finding an error. A successful test is one that uncovers an as yet undiscovered error. A good test case is one that has a high probability of finding error, if it exists. The tests are inadequate to detect possibly present errors. The software more or less confirms to the quality and reliable standards.

Level of Testing:
There are three levels of testing: 1. Unit Testing 2. Integration testing 3. System Testing

[1]: UNIT TESTING:


In unit testing we test the software system in different- different unit or port, this is lowest levels of testing. Unit testing focuses verification effort on the smallest unit of software i.e. the module. Using the detailed design and the process specifications, testing is done to uncover errors within the boundary of the module. All modules must be successful in the unit test before the start of the integration testing begins.

196

Project Report

Job Placement Agency

[2]: INTEGRATION TESTING:


In integration testing we connect different-different components of software. After unit testing, we have to perform integration testing. The goal here is to see if modules can be integrated properly, the emphasis being on testing interfaces between modules. This testing activity can be considered as testing the design and hence the emphasis on testing module interactions.

[3]: SYSTEM TESTING:


System testing is use to check a develop software is user friendly, secure or not and know that system performance speed Here the entire software system is tested. The reference document for this process is the requirements document, and the goal is to see if software meets its requirements. TYPES OF S/T TESTING: Alpha Testing Beta Testing Stress Testing Error seeding White Box Testing/Structural Testing Black Box Testing Accepting Testing Regration Testing Special System Testing: Storage Testing Performance Testing Recovery Testing Procedure Testing Human Testing

197

Project Report

Job Placement Agency

System Testing Validation Testing Integration Testing

Validation Testing Code

Design

System Engineering

198

Project Report

Job Placement Agency

INPUT & OUTPUT SCREENS

199

Project Report Start Window:-

Job Placement Agency

Loading Window:-

200

Project Report Staff Module:- [Save]

Job Placement Agency

Staff Module:- [Show Information for Update]

201

Project Report Staff Module:- [Update]

Job Placement Agency

Staff Module:- [Delete (Record Not Found)]

202

Project Report

Job Placement Agency Staff Module:- [Search (Record Not Found)]

Staff Module:- [Search] (Not Found):

203

Project Report Staff Module:- [Search] (Found):

Job Placement Agency

Staff Record Module:-

204

Project Report Candidate Module:-

Job Placement Agency

Candidate Record Module:

205

Project Report Vacancy Module:-

Job Placement Agency

Vacancy Record Module:-

206

Project Report

Job Placement Agency

Source Module:-

Source Record Module:-

207

Project Report Registration Module:-

Job Placement Agency

Registration Record Module:-

208

Project Report Report Module:-

Job Placement Agency

Report Record Module:-

209

Project Report

Job Placement Agency

Help Module:-

210

Project Report

Job Placement Agency

SYSTEM SECURITY

211

Project Report

Job Placement Agency

SYSTEM SECURITY
Introduction
Security is important not so much because it prevents things. There are basically two types of security associated with this system:
1. Physical security

2. Data security:There are basically two problems associated with data security:a). Data not being available to the authorized person at the time of need. b). Data becoming available to the unauthorized person. To overcome these difficulties the following access facilities has been provided:i) Identification:Unique Ids & password have been provided. ii) Authentication:System checks the password under the particular user identification. The computer permits the various resource to the authorized person. iii) Authorization:The access control mechanism to prevent unauthorized logging to the system.

212

Project Report

Job Placement Agency

LIMITATIONS OF THE PROJECT

213

Project Report

Job Placement Agency

Limitations
Since, every system has some limitations so our proposed system is also not untouchable in this regard. Although it includes every kind of features, but it cant be used in a huge organization where number of networks are very large, because the database used in this system is an average one. Also it doesnt have different kind of access feature for different users. This software is capable of handling all the work related to Job Placement Agency. In present it is develop for a particular Agency but in future it can be used by any other Job Placement Agency to handle the related job. Though it was planned for this system to be absolutely perfect but everything as such has some limitations, so does the System. Following may be the drawback in this system. Though this system is developed as a single user system but it is not a multi level system Beside this software could also be made online. With a little modification the best quality software could be achieved and used in efficient manner

214

Project Report

Job Placement Agency

FUTURE APPLICATION OF THE PROJECT

215

Project Report

Job Placement Agency

Future Application Of the Project


Since this system has been generated by using Object Oriented programming, there are many chances of reusability of the codes in other environment even in different platforms. Also its present features can be enhanced by some simple modification in the codes so as to reuse it in the changing scenario. This software is capable of handling all the work related to Job Placement Agency. In present it is develop for a particular Agency but in future it can be used by any other Job Placement Agency to handle the related job. There are various future scope of this project to do some changes: Beside this software could also be made online. With a little modification the best quality software could be achieved and used in efficient manner.

216

Project Report

Job Placement Agency

BIBLIOGRAPHY
Java A Primer Java-2 Revised Edition Oracle9i And last but not least - by E. Balagurusamy - by Ivan Byros -IGNOU BCA CS-06 -IGNOU BCA CS-74

**********************************************************

217

Das könnte Ihnen auch gefallen