You are on page 1of 70

Submitted to

Punjab Technical University UNIVERSITY,

For the partial fulfillment of requirement for


the
Degree of

Supervised By:
Submitted By:
Mr.Sandeep Singh
Academic Head
Reg.No
Computek Educational Services
Jalandhar

CERTIFICATE

This is to certify that the application software


”Placement Cell” is a bonified work carried out
jointly by abc under my guidance and hence are
eligible to appear in the practical Examination
under ptu university.

Project Incharge

( Mr.Sandeep Singh)

Academic Head
ACKNOWLEGEMENT

A person always requires guidance and help of


others being a Social animal to achieve success in
his/her mission.

First, we thank my teacher Mr. Sandeep Singh, for


his continuous support in the project work. Sir was
always there to listen and to give advice. He is
responsible for involving this project in the first
place. He taught us how to ask questions and
express my ideas. He showed us different ways to
approach a research problem and the need to be
persistent to accomplish any goal. Special thanks
goes to our friends who is most responsible for
helping us to complete the writing of this
dissertation as well as the challenging research
that lies behind it. They brought out the good
ideas in us in project work. More importantly, they
taught us how to work hard and play hard.

abc
SYSTEM DESIGN

HARDWARE REQUIREMENTS

• Processor Requirement:-

P-IV or Dual Core

• HDD Requirements:-

Min 40 GB for system and 1 GB for


application

• RAM:-

Minimum of 512 MB or higher is


recommended.

• Monitor:-

Intel or another better graphics mode


• Secondary Devices:-

CD-ROM 52x (For installation of program)


SOFTWARE REQUIREMENTS

• Platform Requirement:-

Windows 98/ME/2000/XP/NT

• Front End Software:-

Java 6

• Back End Package/Database:-

Microsoft Access 2003

• Internet Browser:-

It required minimum Microsoft Internet


Explorer

• Application Run Mode:-

Dos prompt
Introduction to Java
Java is an object-oriented programming language
with a built-in application programming interface
(API) that can handle graphics and user interfaces
and that can be used to create applications or
applets. Because of its rich set of API's, similar to
Macintosh and Windows, and its platform
independence, Java can also be thought of as a
platform in itself. Java also has standard libraries
for doing mathematics.

Much of the syntax of Java is the same as C and


C++. One major difference is that Java does not
have pointers. However, the biggest difference is
that you must write object oriented code in Java.
Procedural pieces of code can only be embedded
in objects. In the following we assume that the
reader has some familiarity with a programming
language. In particular, some familiarity with the
syntax of C/C++ is useful.

In Java we distinguish between applications, which


are programs that perform the same functions as
those written in other programming languages, and
applets, which are programs that can be
embedded in a Web page and accessed over the
Internet. Our initial focus will be on writing
applications. When a program is compiled, a byte
code is produced that can be read and executed
by any platform that can run Java.

Compared to other programming languages, Java is


most similar to C. However although Java shares
much of C's syntax, it is not C. Knowing how to
program in C or, better yet, C++, will certainly help
you to learn Java more quickly, but you don't need
to know C to learn Java. Unlike C++ Java is not a
superset of C. A Java compiler won't compile C
code, and most large C programs need to be
changed substantially before they can become
Java programs.

What's most special about Java in relation to other


programming languages is that it lets you write
special programs called applets that can be
downloaded from the Internet and played safely
within a web browser. Traditional computer
programs have far too much access to your
system to be downloaded and executed willy-nilly.
Although you generally trust the maintainers of
various ftp archives and bulletin boards to do
basic virus checking and not to post destructive
software, a lot still slips through the cracks. Even
more dangerous software would be promulgated if
any web page you visited could run programs on
your system. You have no way of checking these
programs for bugs or for out-and-out malicious
behavior before downloading and running them.

Java solves this problem by severely restricting


what an applet can do. A Java applet cannot write
to your hard disk without your permission. It
cannot write to arbitrary addresses in memory and
thereby introduce a virus into your computer. It
should not crash your system

Feature of Java

Platform..Independent
The concept of Write-once-run-anywhere (known
as the Platform independent) is one of the
important key feature of java language that makes
java as the most powerful language. Not even a
single language is idle to this feature but java is
more closer to this feature. The programs written
on one platform can run on any platform provided
the platform must have the JVM.

Simple
There are various features that makes the java as
a simple language. Programs are easy to write and
debug because java does not use the pointers
explicitly. It is much harder to write the java
programs that can crash the system but we can
not say about the other programming languages.
Java provides the bug free system due to the
strong memory management. It also has the
automatic memory allocation and deallocation
system.

Object..Oriented
To be an Object Oriented language, any language
must follow at least the four characteristics.

Inheritance :

It is the process of creating the new classes and


using the behavior of the existing classes by
extending them just to
reuse the existing
code and adding the additional features as
needed.

Encapsulation:

It is the mechanism of combining the


information and providing the abstraction.

Polymorphism:

As the name suggest one name multiple form,


Polymorphism is the way of providing the different
functionality by the
functions having
the same name based on the signatures of the
methods.

Dynamic binding:

Sometimes we don't have the knowledge of


objects about their specific types while writing our
code. It is the way
of providing the maximum functionality to a
program about the specific type at runtime.

As the languages like Objective C, C++ fulfills the


above four characteristics yet they are not fully
object oriented languages because they are
structured as well as object oriented languages.
But in case of java, it is a fully Object Oriented
language because object is at the outer most level
of data structure in java. No stand alone methods,
constants, and variables are there in java.
Everything in java is object even the primitive
data types can also be converted into object by
using the wrapper class.

Robust
Java has the strong memory allocation and
automatic garbage collection mechanism. It
provides the powerful exception handling and type
checking mechanism as compare to other
programming languages. Compiler checks the
program whether there any error and interpreter
checks any run time error and makes the system
secure from crash. All of the above features
makes the java language robust.

Distributed
The widely used protocols like HTTP and FTP are
developed in java. Internet programmers can call
functions on these protocols and can get access
the files from any remote machine on the internet
rather than writing codes on their local system.

Portable
The feature Write-once-run-anywhere makes the
java language portable provided that the system
must have interpreter for the JVM. Java also have
the standard data size irrespective of operating
system or the processor. These features makes the
java as a portable language.

Dynamic
While executing the java program the user can
get the required files dynamically from a local
drive or from a computer thousands of miles away
from the user just by connecting with the Internet.
Secure
Java does not use memory pointers explicitly. All
the programs in java are run under an area known
as the sand box. Security manager determines the
accessibility options of a class like reading and
writing a file to the local disk. Java uses the public
key encryption system to allow the java
applications to transmit over the internet in the
secure encrypted form. The bytecode Verifier
checks the classes after loading.

Performance
Java uses native code usage, and lightweight
process called threads. In the beginning
interpretation of bytecode resulted the
performance slow but the advance version of JVM
uses the adaptive and just in time compilation
technique that improves the performance.

Multithreaded
As we all know several features of Java like
Secure, Robust, Portable, dynamic etc; you will be
more delighted to know another feature of Java
which is Multithreaded.
Java is also a Multithreaded programming
language. Multithreading means a single program
having different threads executing independently
at the same time. Multiple threads execute
instructions according to the program code in a
process or a program. Multithreading works the
similar way as multiple processes run on one
computer.
Multithreading programming is a very interesting
concept in Java. In multithreaded programs not
even a single thread disturbs the execution of
other thread. Threads are obtained from the pool
of available ready to run threads and they run on
the system CPUs. This is how Multithreading works
in Java which you will soon come to know in
details in later chapters.

Interpreted
We all know that Java is an interpreted language
as well. With an interpreted language such as Java,
programs run directly from the source code.
The interpreter program reads the source code
and translates it on the fly into computations.
Thus, Java as an interpreted language depends on
an interpreter program.
The versatility of being platform independent
makes Java to outshine from other languages. The
source code to be written and distributed is
platform independent.
Another advantage of Java as an interpreted
language is its error debugging quality. Due to this
any error occurring in the program gets traced.
This is how it is different to work with Java.

Architecture/ Neutral
The term architectural neutral seems to be weird,
but yes Java is an architectural neutral language
as well. The growing popularity of networks makes
developers think distributed. In the world of
network it is essential that the applications must
be able to migrate easily to different computer
systems. Not only to computer systems but to a
wide variety of hardware architecture and
Operating system architectures as well. The Java
compiler does this by generating byte code
instructions, to be easily interpreted on any
machine and to be easily translated into native
machine code on the fly. The compiler generates
an architecture-neutral object file format to enable
a Java application to execute anywhere on the
network and then the compiled code is executed
on many processors, given the presence of the
Java runtime system. Hence Java was designed to
support applications on network. This feature of
Java has thrived the programming language.
Introduction to Microsoft
Access
Microsoft Office Access, previously known as
Microsoft Access, is a relational database
management system from Microsoft that combines
the relational Microsoft Jet Database Engine with a
graphical user interface and software development
tools. It is a member of the 2007 Microsoft Office
system.

Access can use data stored in Access/Jet, Microsoft


SQL Server, Oracle, or any ODBC-compliant data
container (including MySQL and PostgreSQL).
Skilled software developers and data architects
use it to develop application software. Relatively
unskilled programmers and non-programmer
"power users" can use it to build simple
applications. It supports some object-oriented
techniques but falls short of being a fully object-
oriented development tool.

Access was also the name of a communications


program from Microsoft, meant to compete with
ProComm and other programs. This proved a
failure and was dropped.[1] Years later Microsoft
reused the name for its database software.
A database is a collection of information relegated
to a particular subject or purpose, such as tracking
customer order or maintaining a music collection
or novels written by authors in a alphabetic order,
pin code of cities in alphabetic order etc.Using
Microsoft access, you can manage all your
information from a single database file within the
dividing your data into:

1. Separate storage container called tables.

2. View, add and update table data by using online


forms.

3. Find and retrieve the data you want by using


quires.

4. Analyze or print data in a specific layout by


using reports.

History
Access version 1.0 was released in November 1992,
followed in May of 1993 by an Access 1.1 release
to improve compatibility with other Microsoft
products.

Microsoft specified the minimum operating system


for Version 2.0 as Microsoft Windows v3.0 with 4
MB of RAM. 6 MB RAM was recommended along
with a minimum of 8 MB of available hard disk
space (14 MB hard disk space recommended). The
product was shipped on seven 1.44 MB diskettes.
The manual shows a 1993 copyright date.

The software worked well with very large records


sets but testing showed some circumstances
caused data corruption. For example, file sizes
over 700 MB were problematic (note that most
hard disks were smaller than 700 MB at the time
this was in wide use). The Getting Started manual
warns about a number of circumstances where
obsolete device drivers or incorrect configurations
can cause data loss.

Access's initial codename was Cirrus; the forms


engine was called Ruby. This was before Visual
Basic - Bill Gates saw the prototypes and decided
that the BASIC language component should be co-
developed as a separate expandable application, a
project called Thunder. The two projects were
developed separately as the underlying forms
engines were incompatible with each other;
however, these were merged together again after
VBA.

Uses
Access is used by small businesses, within
departments of large corporations, and by hobby
programmers to create ad hoc customized desktop
systems for handling the creation and
manipulation of data. Access can be used as a
database for basic web based applications hosted
on Microsoft's Internet Information Services and
utilizing Microsoft Active Server Pages ASP.

Some professional application developers use


Access for rapid application development,
especially for the creation of prototypes and
standalone applications that serve as tools for on-
the-road salesmen. Access does not scale well if
data access is via a network, so applications that
are used by more than a handful of people tend
to rely on Client-Server based solutions.[citation
needed] However, an Access "front end" (the
forms, reports, queries and VB code) can be used
against a host of database backends, including JET
(file-based database engine, used in Access by
default), Microsoft SQL Server, Oracle, and any
other ODBC-compliant product.

Features

One of the benefits of Access from a


programmer's perspective is its relative
compatibility with SQL (structured query language)
—queries may be viewed and edited as SQL
statements, and SQL statements can be used
directly in Macros and VBA Modules to manipulate
Access tables. Users may mix and use both VBA
and "Macros" for programming forms and logic
and offers object-oriented possibilities.

MSDE (Microsoft SQL Server Desktop Engine) 2000,


a mini-version of Microsoft SQL Server 2000, is
included with the developer edition of Office XP
and may be used with Access as an alternative to
the Jet Database Engine.

Unlike a server-based RDBMS such as SQL Server,


Access does not implement database triggers or
stored procedures. However Access provides a rich
programming environment through its event-driven
forms and reports which utilize VBA. Starting in
Access 2000 (Jet 4.0), there is a new syntax for
creating queries with parameters, in a way that
looks like creating stored procedures, but these
procedures are still limited to one statement per
procedure.[2] Microsoft Access does allow forms to
contain code that is triggered as changes are
made to the underlying table (as long as the
modifications are done only with that form), and it
is common to use pass-through queries and other
techniques in Access to run stored procedures in
RDBMSs that support these.

In ADP files (supported in Access 2000 and later),


the database-related features are entirely
different, because this type of file connects to a
MSDE or Microsoft SQL Server, instead of using the
Jet Engine. Thus, it supports the creation of nearly
all objects in the underlying server (tables with
constraints and triggers, views, stored procedures
and UDF-s). However, only forms, reports, macros
and modules are stored in the ADP file (the other
objects are stored in the back-end database).
Creation of ADP files has been dropped in Access
2007 however; ADP files can still be opened and
run.

Development

Access allows relatively quick development


because of very good GUI design tools, and high
level integration of GUI design and data objects.
All database tables, queries, forms, and reports are
stored in the database. For query development,
Access utilizes the Query Design Grid, a graphical
user interface that allows users to create queries
without knowledge of the SQL programming
language. In the Query Design Grid, users can
"show" the source tables of the query and select
the fields they want returned by clicking and
dragging them into the grid. Joins can be created
by clicking and dragging fields in tables to fields
in other tables. Access allows users to view and
manipulate the SQL code if desired.

The programming language available in Access is,


as in other products of the Microsoft Office suite,
Microsoft Visual Basic for Applications. Two
database access libraries of COM components are
provided: the legacy Data Access Objects (DAO),
which was superseded for a time (but still
accessible) by ActiveX Data Objects (ADO);
however (DAO) has been reintroduced in the latest
version, Microsoft Access 2007.

Many developers who use Access use the


Leszynski naming convention, though this is not
universal; it is a programming convention, not a
DBMS-enforced rule.[3] Except in VBA, it is also
made redundant by the fact that Access
categorises each object automatically and always
shows the object type, by prefixing Table: or
Query: before the object name when referencing a
list of different database objects.
Microsoft Access can be applied to small projects
(the Access 97 speed characterization was done for
32 users)[4]but scales poorly to larger projects with
more than several 100MB of data or many users
because of the way indexing and locking are
handled. As a Microsoft Access database can be
cached locally when used on network, processing
speed may be substantially better when there is
only a single user. Because of the effect of packet
latency on the record locking system, Access
databases are effectively too slow to be used on a
Virtual Private Network or a Wide Area Network.
Access includes an Upsizing Wizard that allows
users to upsize their database to Microsoft SQL
Server if they want to move to an ODBC client-
server database.

One recommended technique is to migrate to SQL


Server and utilize Access Data Projects. This allows
stored procedures, views, and constraints using
standard SQL. Additionally this full client-server
design significantly reduces maintenance and
availability problems.

Access allows no relative paths when linking, so


the development environment should have the
same path as the production environment (though
it is possible to write a "dynamic-linker" routine in
VBA). This technique also allows the developer to
divide the application among different files.

Protection

If the database design needs to be secured to


prevent from changes, Access databases can be
locked/protected (and the source code compiled)
by converting the database to an .MDE file. All
changes to the database structure (tables, forms,
macros, etc.) need to be made to the original MDB
and then reconverted to MDE.

Some tools are available for unlocking and


'decompiling', although certain elements including
original VBA comments and formatting are
normally irretrievable.

Microsoft Access calls anything that can have a


name an object. Within an Access Database, the
main objects are tables, queries, forms, reports,
data access pages, macros, and modules.

Main Components of MSAccess

Database

A database is files in which you store data include


all the major objects related to the stored data;
including objects you define to automat the use of
your data. In other database systems, the term
database used to refer to only those files in which
you store data.

Table

An object you define and use to store data. Each


table contains information
about a particular subject, such as customers or
orders.
Table contains Fields (or columns) that store
different kinds of data, such as a name or an
address, and, Records (or rows) that collect all the
information about a particular instance of the
subject.

E.g. All the information about a company

You can define a primary key (one or more fields


that have a unique value for each record) and,
one or more indexes on each table to help
retrieve your data more quickly.

Query

Query in an object that provides a custom view of


data from one or more tables. In Access, you can
use the graphical query by example (QBE) facility
or you can write SQL statements to create your
queries. You can define queries to select, update,
insert, or delete data. You can also define queries
that create new tables from data in one or more
existing tables.

Form

An object designed primarily for data input or


display or for control; of application execution. You
use forms to customize the presentation of data
that your application extracts for queries or tables.
You can also print forms. You can design a form
to run a macro or a Visual Basic procedure in
response to any of a number of events- for
example, to run a procedure when the value of
data changes.

Report

An object designed for formatting, calculating,


printing, and summarizing selected data. You can
view a report on your screen before you print it.

Data Access Page

An object that includes an HTML file and


supporting files to provide custom access to your
data from Microsoft Internet Explorer. You can
publish these files on your company intranet to
allow other users on your network who also have
Office 2000 and Internet Explorer version 5 or later
to view, search, and edit your data.

Macro

Macro is an object that is a structured definition of


one or more actions that you want Access to
perform in response to a defined event.
For example, you might design a macro that
opens a second form in response to the selection
of an item on a main form. You might have
another macro that validate the content of a field
whenever the value in the field changes. You can
include simple conditions in macros to specify
when one or more actions in the macro should be
performed or skipped. You can use macros to
open and execute queries, to open tables, or to
print or view reports. You can also run other
macros or visual Basic procedures from within a
macro.

Module

It is an object containing custom procedures that


you code using Visual Basic. Modules provide a
more discrete flow of actions and allow you to
trap errors something you can't do with macros.
Modules can be stand-alone objects containing
functions that can be called from anywhere in
your application, or they can be directly associated
with a form or a report to respond to events on
the associated form or report.
Table stores the data that you can extract with
queries and display in reports or that you can
display and update in forms or data access pages.
Notice that forms, reports, and data access pages
can use data either directly from tables or from a
filtered "view" of the data created by using
queries. Queries can use Visual; Basic functions to
provide customized calculations on data in your
database. Access also has many built-in functions
that allow you to summaries and format your data
in queries.

Events on forms and reports can "trigger" either


macros or Visual Basic procedures.

Control
Control is an object on a form or report that
contains data. You can even design a macro or a
Visual Basic procedure that responds to the user
pressing individual keys on the keyboard when
entering data.
Screen Designs

login

Wrong Password
Applicant Joining Form
Employer Form
Employers details
Applicant’ s details

Source Code
Login. Java

import javax.swing.*;

import java.awt.*;

import java.awt.event.*;

import java.sql.*;

public class login extends JFrame implements


ActionListener{

JPanel butpan=new JPanel();

JPanel logpan=new JPanel();

JPanel selpan=new JPanel();

JLabel un=new JLabel("Login-ID");

JTextField usr=new JTextField(10);

JLabel pd=new JLabel("Password");

JTextField pwd=new JTextField(10);

JButton reset=new JButton("Reset");


JButton log=new JButton("Login");

JButton join=new JButton("Join");

JRadioButton app=new JRadioButton("Applicants");

JRadioButton emp=new JRadioButton("Employers");

ButtonGroup bg=new ButtonGroup();

Connection clog;

Statement st;

int flag=0;

int i=0;

public static void main(String args[]){

new login();

public login(){

getContentPane().add(butpan,BorderLayout.SOUTH);
getContentPane().add(logpan,BorderLayout.WEST);

getContentPane().add(selpan,BorderLayout.EAST);

logpan.add(un);

logpan.add(usr);

logpan.add(pd);

logpan.add(pwd);

butpan.add(reset);

butpan.add(log);

butpan.add(join);

selpan.add(app);

selpan.add(emp);

bg.add(app);

bg.add(emp);
setVisible(true);

setSize(400,400);

setDefaultCloseOperation(EXIT_ON_CLOSE);

pack();

reset.addActionListener(this);

log.addActionListener(this);

join.addActionListener(this);

public void actionPerformed(ActionEvent ae){

Object source=ae.getSource();

if(source==reset){

usr.setText("");

pwd.setText("");
}

else if(source==join){

if(app.isSelected()) { new app(); setVisible(false);}

else if(emp.isSelected()) { new emp();


setVisible(false);}

else if(source==log){

/*Log in of Applicants start from here*/

if(app.isSelected()){

try{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

clog=DriverManager.getConnection("jdbc:odbc:g
o");

st=clog.createStatement();
ResultSet rsLog1=st.executeQuery("select *
from Applicant");

while(rsLog1.next()){

boolean
b1=rsLog1.getString(8).equals((String)usr.getText());

boolean
b2=rsLog1.getString(9).equals((String)pwd.getText());

if( b1 && b2 ){

JOptionPane.showMessageDialog(null,"done");
//Remove this line

new empdetail(rsLog1.getInt(7));

flag=1;

break;

if(flag!=1 && i<=3){

++i;
JOptionPane.showMessageDialog(null,"Invalid
Entry");

else if(flag!=1 && i>3){

System.exit(0);

else if(flag==1){

setVisible(false);

catch(Exception excp){

JOptionPane.showMessageDialog(null,excp);

System.exit(0);

/*log in of Employers Start from here*/


else if(emp.isSelected()){

try{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

clog=DriverManager.getConnection("jdbc:odbc:g
o");

st=clog.createStatement();

ResultSet rsLog2=st.executeQuery("select *
from Company");

while(rsLog2.next()){

boolean
b1=rsLog2.getString(5).equals((String)usr.getText());

boolean
b2=rsLog2.getString(6).equals((String)pwd.getText());

if( b1 && b2 ){

JOptionPane.showMessageDialog(null,"done");
//Remove this line

new appdetail(rsLog2.getInt(4));

flag=1;
break;

if(flag!=1 && i<=3){

++i;

JOptionPane.showMessageDialog(null,"Invalid
Entry");

else if(flag!=1 && i>3){

System.exit(0);

else if(flag==1){

setVisible(false);

catch(Exception excp){

JOptionPane.showMessageDialog(null,excp);

System.exit(0);
}

App. java

import java.awt.*;

import javax.swing.*;

import java.awt.event.*;

import java.sql.*;

public class app extends JFrame implements


ActionListener

JPanel p=new JPanel();

JPanel q=new JPanel();


JTextField tname,tage,textra,tusr,tpwd;

JLabel
lname,lage,lsex,ledu,lextra,lexpect,lsal,Blank,Blank1,Bl
ank2,Blank3,Blank4,lusr,lpwd;

JRadioButton rbml,rbfml;

JComboBox cbedu,cbsal;

JRadioButton it,civil,mech;

JButton bSub,bRes;

String sex=new String();

int field;

public static void main(String args[]){

new app();

public app()

{
getContentPane().add(p,BorderLayout.CENTER);

getContentPane().add(q,BorderLayout.SOUTH);

setTitle("Placement Office");

lusr=new JLabel("Login Name: ");

lpwd=new JLabel("Password: ");

lname=new JLabel("Name: ");

lage=new JLabel("Age: ");

lsex=new JLabel("Sex: ");

ledu=new JLabel("Education: ");

lextra=new JLabel("Extra: ");

lexpect=new JLabel("Field: ");

lsal=new JLabel("Minimum Expected Salary: ");

tusr=new JTextField(10);
tpwd=new JTextField(10);

tname=new JTextField(20);

tage=new JTextField(2);

textra=new JTextField(15);

rbml=new JRadioButton("Male");

rbfml=new JRadioButton("Female");

ButtonGroup bgrp=new ButtonGroup();

bgrp.add(rbml);

bgrp.add(rbfml);

cbedu=new JComboBox();

cbedu.addItem("Diploma");

cbedu.addItem("Degree");

cbedu.addItem("Post-Graduate");

cbsal=new JComboBox();
cbsal.addItem("5,000");

cbsal.addItem("10,000");

cbsal.addItem("15,000");

cbsal.addItem("20,000");

it=new JRadioButton("Software Engg.");

civil=new JRadioButton("Civil Engg.");

mech=new JRadioButton("Mechanical Engg.");

ButtonGroup bg2=new ButtonGroup();

bg2.add(it);

bg2.add(civil);

bg2.add(mech);

bSub=new JButton("Submit");

bRes=new JButton("Reset");

p.setLayout(new GridLayout(12,2));
Blank=new JLabel("");

Blank1=new JLabel("");

Blank2=new JLabel("");

Blank3=new JLabel("");

Blank4=new JLabel("");

p.add(lusr);

p.add(tusr);

p.add(lpwd);

p.add(tpwd);

p.add(lname);

p.add(tname);
p.add(lage);

p.add(tage);

p.add(lsex);

p.add(rbml);

p.add(Blank);

p.add(rbfml);

p.add(ledu);

p.add(cbedu);

p.add(lextra);

p.add(textra);

p.add(lexpect);

p.add(it);
p.add(Blank4);

p.add(civil);

p.add(Blank1);

p.add(mech);

p.add(lsal);

p.add(cbsal);

q.add(bSub);

q.add(bRes);

bSub.addActionListener(this);

bRes.addActionListener(this);

setVisible(true);
setBounds(200,200,500,500);

setDefaultCloseOperation(EXIT_ON_CLOSE);

public void actionPerformed(ActionEvent e){

Object source=e.getSource();

if(source==bRes){

tname.setText("");

tage.setText("");

cbedu.setSelectedItem("Diploma");

textra.setText("");

tusr.setText("");

tpwd.setText("");

}
else{

if(it.isSelected())field=1;

else if(civil.isSelected())field=2;

else if(mech.isSelected())field=3;

if(rbml.isSelected())sex="MALE";

else if(rbfml.isSelected())sex="FEMALE";

try{

int age=Integer.parseInt(tage.getText());}

catch(Exception ex){tage.setText("");}

if(tname.getText().equals("") |
textra.getText().equals("") | tage.getText().equals("") |
sex.equals("") | field==0 )
JOptionPane.showMessageDialog(null,"Please Fill in
All Valid Entries!!");
else{

String sal=(String)cbsal.getSelectedItem();

String edu=(String)cbedu.getSelectedItem();

try{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection
conn=DriverManager.getConnection("jdbc:odbc:go");

Statement st=conn.createStatement();

st.executeUpdate("INSERT INTO Applicant


VALUES('" + tname.getText() + "','" + tage.getText()
+ "','" + sex + "','" + edu + "','" + textra.getText() +
"','" + sal + "','" + field + "','" + tusr.getText() + "','"
+ tpwd.getText() + "')");

conn.close();
String msg="Your Details are Stored. Login
again to View Related Companies! Thank You!!";

JOptionPane.showMessageDialog(null,msg);

new login();

setVisible(false);

catch(Exception exc){

JOptionPane.showMessageDialog(null,tname.get
Text()+" : "+exc);

System.exit(0);

Appdetail. java

import javax.swing.*;
import java.awt.*;

import java.awt.event.*;

import java.sql.*;

public class appdetail extends JFrame{

public static void main(String args[]){

new appdetail(0);

JTable tab;

JPanel tpan=new JPanel();

JPanel bpan=new JPanel();

String
header[]={"Name","Age","Sex","Education","Co-
curriculars","Salary"};

Object data[][]=new String[15][6];

JButton check=new JButton("TRY");


int i,j,ki;

public appdetail(int k){

this.ki=k;

setVisible(true);

setSize(800,600);

setDefaultCloseOperation(EXIT_ON_CLOSE);

getContentPane().add(tpan,BorderLayout.CENTER);

getContentPane().add(bpan,BorderLayout.SOUTH);

bpan.add(check);

try{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection
conn=DriverManager.getConnection("jdbc:odbc:go");

Statement st=conn.createStatement();

ResultSet rs=st.executeQuery("select * from


Applicant where Field="+ki);

while(rs.next()){
for(j=0;j<=5;j++)

data[i][j]=rs.getString(j+1);

i++;

catch(Exception e){

JOptionPane.showMessageDialog(null,data[1][0]);

System.exit(0);

tab=new JTable(data,header);

tab.setPreferredScrollableViewportSize(new
Dimension(600,600));

JScrollPane sp=new JScrollPane(tab);

tpan.add(sp);

pack();

}
Emp. java

import java.awt.*;

import javax.swing.*;

import java.awt.event.*;

import java.sql.*;

public class emp extends JFrame implements


ActionListener{

JPanel p=new JPanel();

JPanel q=new JPanel();

JTextField tname,textra,tusr,tpwd;

JLabel
lname,lextra,lfield,lsal,Blank,Blank1,Blank2,Blank3,Blan
k4,lusr,lpwd;

JComboBox cbsal;

JRadioButton it,civil,mech;

JButton bSub,bRes;

int field;
public static void main(String args[]){

new emp();

public emp(){

getContentPane().add(p,BorderLayout.CENTER);

getContentPane().add(q,BorderLayout.SOUTH);

setTitle("Placement Office");

lname=new JLabel("Name: ");

lextra=new JLabel("Vacancy(s): ");

lfield=new JLabel("Field: ");

lsal=new JLabel("Minimum Expected Salary: ");


lusr=new JLabel("Login name: ");

lpwd=new JLabel("Password: ");

tname=new JTextField(20);

textra=new JTextField(15);

tusr=new JTextField(10);

tpwd=new JTextField(10);

cbsal=new JComboBox();

cbsal.addItem("5,000");

cbsal.addItem("10,000");

cbsal.addItem("15,000");

cbsal.addItem("20,000");

it=new JRadioButton("Software Engg.");

civil=new JRadioButton("Civil Engg.");

mech=new JRadioButton("Mechanical Engg.");


ButtonGroup bg2=new ButtonGroup();

bg2.add(it);

bg2.add(civil);

bg2.add(mech);

bSub=new JButton("Submit");

bRes=new JButton("Reset");

p.setLayout(new GridLayout(11,2));

Blank=new JLabel("");

Blank1=new JLabel("");

Blank2=new JLabel("");

Blank3=new JLabel("");

Blank4=new JLabel("");

p.add(lusr);
p.add(tusr);

p.add(lpwd);

p.add(tpwd);

p.add(lname);

p.add(tname);

p.add(lextra);

p.add(textra);

p.add(lfield);

p.add(it);

p.add(Blank4);

p.add(civil);
p.add(Blank1);

p.add(mech);

p.add(lsal);

p.add(cbsal);

q.add(bSub);

q.add(bRes);

bSub.addActionListener(this);

bRes.addActionListener(this);

setVisible(true);

setBounds(200,200,300,300);

setDefaultCloseOperation(EXIT_ON_CLOSE);

}
public void actionPerformed(ActionEvent e){

Object source=e.getSource();

if(source==bRes){

tname.setText("");

textra.setText("");

else{

if(it.isSelected())field=1;

else if(civil.isSelected())field=2;

else if(mech.isSelected())field=3;

if(tname.getText().equals("") |
textra.getText().equals("") | field==0 )
JOptionPane.showMessageDialog(null,"Please Fill in
All Entries!!");
else{

String sal=(String)cbsal.getSelectedItem();

try{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection
conn=DriverManager.getConnection("jdbc:odbc:go");

Statement pst=conn.createStatement();

pst.executeUpdate("INSERT INTO Company


VALUES('" + tname.getText() + "','" +
textra.getText() + "','" + (String)sal + "','" + field +
"','" + tusr.getText() + "','" + tpwd.getText() + "')");

conn.close();

String msg="Your Details are Stored. Login


again to View Related applicants! Thank You!!";

JOptionPane.showMessageDialog(null,msg);

setVisible(false);

new login();
}

catch(Exception exc){

JOptionPane.showMessageDialog(null,tname.get
Text()+" : "+exc);

System.exit(0);

Empdetail. java

import javax.swing.*;

import java.awt.*;

import java.awt.event.*;

import java.sql.*;
public class empdetail extends JFrame{

public static void main(String args[]){

new empdetail(0);

JTable tab;

JPanel tpan=new JPanel();

JPanel bpan=new JPanel();

String header[]={"Name","Vacancy","Salary"};

Object data[][]=new String[15][3];

JButton check=new JButton("TRY");

int i,j,ki;

public empdetail(int k){

this.ki=k;

setVisible(true);
setSize(600,600);

setDefaultCloseOperation(EXIT_ON_CLOSE);

getContentPane().add(tpan,BorderLayout.CENTER);

getContentPane().add(bpan,BorderLayout.SOUTH);

bpan.add(check);

try{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection
conn=DriverManager.getConnection("jdbc:odbc:go");

Statement st=conn.createStatement();

ResultSet rs=st.executeQuery("select * from


Company where Field="+ki);

while(rs.next()){

for(j=0;j<=2;j++)

data[i][j]=rs.getString(j+1);

i++;

}
catch(Exception e){

JOptionPane.showMessageDialog(null,data[1][0]);

System.exit(0);

tab=new JTable(data,header);

tab.setPreferredScrollableViewportSize(new
Dimension(600,600));

JScrollPane sp=new JScrollPane(tab);

tpan.add(sp);

pack();