344
A PROJECT REPORT ON Submitted By: Shubham Barnwal Sunil Krishna Saxena Shivam Rastogi Submitted To: Res. Sanjeev Sharma

HII

Embed Size (px)

DESCRIPTION

PROJECT REPORT

Citation preview

PAYROLL MANAGEMENT SYSTEM

A PROJECT REPORT ON2009-2012PAYROLL MANAGEMENT SYSTEMSubmitted towards the partial fulfillment for the requirement of the degree course ofBachelor Of Computer Applications

Submitted To:Res. Sanjeev Sharma SirSubmitted By:Shubham BarnwalSunil Krishna SaxenaShivam RastogiPrashant Gangwar

This project has the many features which are useful for the payroll management purpose. In this software the user can store the information of the personnels, store the information of distribution of salaries, manage accounts of the personnel, store information of tax payed by the personnels.The Project is an endeavor to improve efficiency in the process of registration time duration. How schema the allot and how much the time direction.

The above mentioned process till date is totally manual leaching to transaction processing system has resulted in reasonable solution to current problem.The after I Modified versions Modules, considering. The various validation checks and security measures. Which are prerequisite of on-line system. It is apparent the besides in traducing efficient customer management, improved accuracy access to customer status etc. the new system relieve the concerned dept. of the redundant workload.

The projecT work PAYROLL MANAGEMENT SYSYTEM is completed and now it is before you. It is a result of our efforts.

With the help of Mr.Sanjeev Saxena Sir, our project guide and Mr.Nitin Kannojiya Sir, our Java instructor only this project is possible. We could collect the various information about the PAYROLL and the tools used in its preparing and the result is in the form of our project work named PAYROLL MANAGEMENT SYSTEM.

We are also greatful to our parents who not only helped us but also inspired and encouraged us in completing the project work successfully and carefully. We hope this project work will prove itself a milestone to others but the evaluation of this project is in your hands.With due regards to our elders, we pay our respect to them and dedicate this project to them.

[Type the company address]

I am student of BCA (Bachelors Of Computer Application) declared that this project report submitted for the fulfillment of BCA course 2009-2012. This project is original and is not submitted anywhere.

Shubham Barnwal

The software development is this biggest challenge in information technology. Fifteen years have elapsed since the development in IT sector for software development. The entire scenario has been changed after this growth, now peoples & organization are more likely to be depend on softwares like Property Management, Financial Accounting, Sales order, Hospital etc.Each software has its own strength and points of emphasis, depending on the analysis of the systems have emphasized the computational and model based assumption in softwares. This emphasized arises from the experience obtained in software development unit with higher end professionals in IT sector.The level of presentation for the best of end user in the organization. However it is an attempt to provide the best in the industry.SHUBHAM BARNWAL

Our team has decided to work on very popular topic Student Management that keep all the maintenance of record of any data.The system will be very much prevalent in coming to help the user friendly manner to reduce paper work given rise to voluminous records and also to eliminate difficulties which were being faced while using the manual system.In the preparation of this project, we got full support of our college , our project guide and also from the proprietor running Computer Labs for providing us necessary information which is being required during course of development software.I was very overwhelmed doing this project and this project will serve us better opportunities in future.

It is not easy to maintain this software with this short period of time. It takes our hard efforts to work under this project. Sometimes we faced the problem of connectivity with the database the hardware configuration, calculation processes problem faced when data was not centralized.

The documentation must be in scheduled and there must be the index of the documentation by which one can search out any problem.

About the Project Software Development Life cycle NetBeans IDE System Analysis Preliminary investigation Feasibility Study Technical Feasibility Economic Feasibility Operational Feasibility Request Approval Introduction About MSAccess Hardware requirement Software requirement Database Design Creating a java Application Coding System We Worked. Testing Data Flow Diagram Testing Conclusion Future Enhancements Bibliography

This project provides the facility for payroll management . User can store the information about properties and payment. Its also provides the facility for maintain information about personnels and different users.

The software uses Ms-Access 8.1.5.0.0 (Enterprise Edition) as the back end and Net Beans IDE as the front end. The choice of the software was definitely driven by current demand of the software in todays market.

The software development life cycle (SDLC)(sometimes referred to as the system development life cycle) is the process of creating or altering software systems, and the models and methodologies that people use to develop these systems. In any such lifecycle, people, process and technology all play a role in success. PTC is committed to developing solutions for engineering (Software System Lifecycle Management) and IT (Application Lifecycle Management) organizations along with world class technology (PTC Integrity) to accelerate innovation in software intensive products and systems.

Business analysts, architects, engineers, developers, quality managers, testers, partners/suppliers and other stakeholders (across multiple locations and organizations) all use PTC Integrity as the means for complete collaboration and control over the end-to-end software development life cycle.

With seamless, collaborative management of all activities and assets, PTC Integrity delivers greater transparency, better productivity and shorter cycle times across the entire development lifecycle.

System analysisThe goal of system analysis is to determine where the problem is in an attempt to fix the system. This step involves breaking down the system in different pieces to analyze the situation, analyzing project goals, breaking down what needs to be created and attempting to engage users so that definite requirements can be defined.DesignIn systems design the design functions and operations are described in detail, including screen layouts, business rules, process diagrams and other documentation. The output of this stage will describe the new system as a collection of modules or subsystems.The design stage takes as its initial input the requirements identified in the approved requirements document. For each requirement, a set of one or more design elements will be produced as a result of interviews, workshops, and/or prototype efforts.Design elements describe the desired software features in detail, and generally include functional hierarchy diagrams, screen layout diagrams, tables of business rules, business process diagrams, pseudocode, and a complete entity-relationship diagram with a full data dictionary. These design elements are intended to describe the software in sufficient detail that skilled programmers may develop the software with minimal additional input design.ImplementationAfter testing is done of all those modules of the proposed project, the software is now implemented into operational software. It involves programmers, users, & operational managements. Implementation is the process of converting a new software design.

TestingThe code is tested at various levels in software testing. Unit, system and user acceptance testings are often performed. This is a grey area as many different opinions exist as to what the stages of testing are and how much, if any iteration occurs. Iteration is not generally part of the waterfall model, but usually some occur at this stage. In the testing the whole system is test one by oneFollowing are the types of testing: Defect testing the failed scenarios, including defect tracking Path testing Data set testing Unit testing System testing Integration testing Black-box testing White-box testing Regression testing Automation testing User acceptance testing Software performance testing

Operations and maintenanceThe deployment of the system includes changes and enhancements before the decommissioning or sunset of the system. Maintaining the system is an important aspect of SDLC. As key personnel change positions in the organization, new changes will be implemented, which will require system.

NetBeans refers to both a platform framework for Java desktop applications, and an integrated development environment (IDE) for developing with Java, JavaScript, PHP, Python (no longer supported after NetBeans 7), Groovy, C, C++, Scala, Clojure, and others. The NetBeans IDE 7.0 no longer officially supports Ruby and Ruby on Rails, but a third party plugin allows for development.The NetBeans IDE is written in Java and can run on Windows, Mac OS, Linux, Solaris and other platforms supporting a compatible JVM. A pre-existing JVM or a JDK is not required.The NetBeans platform allows applications to be developed from a set of modular software components called modules. Applications based on the NetBeans platform (including the NetBeans IDE) can be extended by third party developers.

Developer(s)Oracle Corporation

Stable release7.1.2 / April 26, 2012; 44 days ago

Preview releasenone

Written inJava

Operating systemCross-platform (multi-platform)

PlatformJava SE

Available inMultilingual

TypeJava IDE

LicenseCDDL or GPL2 + "certain source files" allow classpath exception

Websitenetbeans.org

It is not necessary to learn every feature of the NetBeans IDE before exploring its GUI creation capabilities. In fact, the only features that you really need to understand are the Palette, the Design Area, the Property Editor, and the Inspector. We will discuss these features below. The PaletteThe Palette contains all of the components offered by the Swing API. You can probably already guess what many of these components are for, even if this is your first time using them (JLabel is a text label, JList is a drop-down list, etc.)

From this list, our application will use only JLabel (a basic text label), JTextField (for the user to enter the temperature), and JButton (to convert the temperature from Celsius to Fahrenheit.)The Design Area

The figure above shows a single JFrame object, as represented by the large shaded rectangle with blue border. Commonly expected behavior (such as quitting when the user clicks the "close" button) is auto-generated by the IDE and appears in the source view between uneditable blue sections of code known as guarded blocks.

A quick look at the source view reveals that the IDE has created a private method named initComponents, which initializes the various components of the GUI. It also tells the application to "exit on close", performs some layout-specific tasks, then packs the (soon to be added) components together on screen.

Don't feel that you need to understand this code in any detail; we mention it here simply to explore the source tab. For more information about these components, see: How to Make Frames (Main Windows) and Laying Out Components Within a Container. The Property EditorThe Property Editor does what its name implies: it allows you to edit the properties of each component. The Property Editor is intuitive to use; in it you will see a series of rows one row per property that you can click and edit without entering the source code directly. The following figure shows the Property Editor for the newly added JFrame object:

The screenshot above shows the various properties of this object, such as background color, foreground color, font, and cursor. The InspectorThe last component of the NetBeans IDE that we will use in this lesson is the Inspector:

The Inspector The Inspector provides a graphical representation of your application's components. We will use the Inspector only once, to change a few variable names to something other than their defaults.

Analysis is the detailed study of the various operations performed by the system and their relationship within or outside the system. One aspect of analyzing the system is defining the boundaries of the system and determining whether or not a candidate.

System should consider other related system. During analysis, data are collection on all available files. Decision points, and transactions handled by the present system. Ones analysis is completed, the analyst has firm understanding of what is done.

Preliminary InvestigationThis phase is one in which a request is made by business system to receive the assistance from system developers. The request may be made for various reasons.The persons initiating the request might be:- A customer A distributor An employee A system specialist This phase is broken into parts: Request Clarification Whenever a representative of a business system make request for a change, that request might not have been clearly communicated, therefore before any system investigation can commence, the project request must be examined to clearly understand what the business system requires, In this phase the project request has to be verified for its ingenuity to understand what the user wants.

Feasibility Studyan important outcome of the first phase is the determination of the project requests feasibility.There are three aspects of feasibility:- Technical FeasibilityDetermines whether the work for the project can be done with the existing equipment, software technology and available personnel. Economic FeasibilityDetermine whether there are sufficient benefits in creating the system to make cost acceptable, or the cost of the system is too high. Operational feasibilityFinds out whether the system if developed will be used or will there be any strong resistance from any component of the system. Request Approval The last part is request approval. Not all requested projects are both desirable and feasible. Many projects requests are received from employees only a few of whom can be perused. However, those projects that are both feasible and desirable and desirable should be put into use so approval of the users has to be got in order to start on other issues, such as cost, priority, completion time and personal requirement.

Microsoft Access is a relational database management system (DBMS). At the most basic level, a DBMS is a program that facilitates the storage the retrieval of structure information on a computers hard drive. Example of well-know industrial-strength relational DBMS include Ms-Access.A full-feature procedural programming language, essentially a subset of visual basic.A simplified procedural macro language unique to Access.A rapid application development environment computer with visual form and report development tools.A sprinkling of objected-oriented extension.Various wizards and builder to make development easier. For new user, these multiple personalities can be a source of enormous frustration. The problem is that each personality is based on a different set of assumption and a different view of computing for instance.

The relational database personality expects you to view your application as sets of data. Microsoft SQL server. IBM DB2. Informix.

Well-know PC-based (desktop) relational DBMS include Microsoft Access. Microsoft Fox-pro. Borland DBase.

The many faces of AccessMicrosoft generally like to incorporate as many features as possible into its product .For example, the Access package contains the following elements: A relational database system that supports two industry standard query language: Structure Query language (SQL) and Query by Example (QBE); What is Access?

The procedural programming personality expects you to view your application as commands to be executed sequentially.

The object oriented personality expects you to view your application as objects which encapsulate state and behavior information. Microsoft makes no effort to provide an overall logical integration of these personalities (indeed, it is unlikely that such integration is possible).Instead, it is up to you as a developer to pick and choose the best approach to implementing your application. Since there are often several vastly different ways to implement a particular feature in access, recognizing the different personalities and exploiting the best features (and avoiding the pitfalls) of each are important skills for Access developer. The advantage of these multiple personalities is that it is possible to use Access to learn about an enormous range of information.System concepts without introduction to Microsoft Access having toInteract with a large number of single-personality tools. for example: Ms-Access for relational database. Power Builder for rapid application, Smalltalk for objects-oriented programming.

Keep this advantage in mind as we switch back and forth between personalities and different computing paradigms.

Access databaseAlthough the term database typically refers to a collection of related data table, an Access database includes more than just data. In addition to table, an Access database file contains several different types of database objects. Saved queries for organizing data, Forms for interacting with data on screen, Reports for printing results,

Macros and visual basics programs for extending the functionality of database application. These entire database objects are stored in a single file named . MDB. When you are running Access, temporary locking file named.LAB is also created you can safely ignore the*.LAB file; everything of value is in the *.mdb file.

Microsoft Access documents are called database. An Access database is a collection of database, object, table, queries, forms, reports, macros, and modules. You can design new object or open existing ones to work with your database unlike many database programs an Access database can contain all of the objects that make up a database application in a single file with the .mdb file name extension. For this reason, an Access database file is sometimes called a database.You can store general-purpose Microsoft Visual Basic for application procedures in a library database. An Access database application can call procedures from a library database. After establishing a link to the database. Called a reference. You can create or purchase tools called add-ins to add custom feature to Access. Access user-level security account information is stored in a database. Called a workgroup information file.

TABLES:-

In Microsoft Access, you store data in table. Table organizes data into columns and rows. Each row in a table is called a record. Each column in a record is called a field. For example, each record in a Customer table contains information about one customer. Each customers record contain fields name for each piece of information you want to store about the customer, such as last name, first name, address, city, state/province, postal code and phone. Users can enter and modify data in table directly or through queries and data entry forms.

Storing related data in separate tables :-

You can create a separate table for each topic of data. Such as customers, employees, or products. Using a separator table for each topic means that you store that data only once, which makes your database .more efficient and reduces data entry errors. For example If you, if you store both customer and order information in one table, whenever a customer places an additional order, you have to reenter information about that customer. Not only is this inefficient, but errors can occur when information is reentered. If you keep separate table for customer and orders, each customer has only one record in the Customer table. If you need to update or correct information about a customer, you need to change data in only one record. This method eliminates redundant entries and reduces datacenter errors.

The process of eliminating redundancy by dividing data into separate related table is called normalization. Access providers a wizard called the Table analyzer Wizard to help you normalize your database.

Defining Relationships

To bring the data from multiple tables together for a query, form or report, you define relationship between the tables based on a common piece of information stored in both tables. For example a Customer table typically contains a Customer ID field whose value uniquely identifies each customer. If the order table also has a Customer_ID field, you can define a relationship between the two tables, so that when you enter orders, you can enter a customers ID number to relate information from the Customer table to that order. Instead of actually typing the Customer_ID.you can use a lookup list box, as shown in the orders form the north wind sample database.

System Type :Personal ComputersProcessor Type :Pentium III 450 Mhz or higher RAM :64 MB or Higher HDD :Atleast 500 Mb of free Space for Good performance 125 Mb Space required to intallSVGA Modes :256 colour or Higher and 800 * 600 resolutionNetwork:LAN network connected through TCP/IPLAN Cards

Operating System:Windows 9x, NT, Me or XP Language : Java 2 Runtime Environment Database : MS Access2007 IDE: Net Beans 6.7.1 and later versions

LOGIN TABLEFIELD NAME TYPE SIZE

USERNAMEPASSWORD TEXT TEXT

50 50

PERSONNEL TABLEFIELD NAME TYPE SIZE

IDNAMEFSTHERS NAMEDOBDOJGENDERDEPARTMENTPOSTCONTACTADDRESSEMAILSALARYLONGTEXTTEXTDATE/TIMEDATE/TIMETEXTTEXTTEXTLONGTEXTTEXTDOUBLE4505088505050450508

SALARY TABLE FIELD NAME TYPE SIZE

SLIP NO.ID NAMEPOSTMONTHWORKINGDAYSSALARYDAHRATOTAL SALLONGLONGTEXTTEXTTEXTINTEGERDOUBLEDOUBLEDOUBLEDOUBLE4450505028888

TAX TABLE

FIELD NAME TYPE SIZE

IDSLIP NO.NAMEDEPTT.POSTTOTAL SALARYTAX

LONGLONGTEXTTEXTTEXTDOUBLEDOUBLE

4450505088

/* * To change this template, choose Tools | Templates * and open the template in the editor. */

/* * mdi.java * * Created on Jun 9, 2012, 11:05:02 PM */

package rol;

/** * * @author Shubham Barnwal */public class mdi extends javax.swing.JFrame {

/** Creates new form mdi */ public mdi() { initComponents(); }

/** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // private void initComponents() {

d1 = new javax.swing.JDesktopPane(); menuBar = new javax.swing.JMenuBar(); fileMenu = new javax.swing.JMenu(); openMenuItem = new javax.swing.JMenuItem(); saveMenuItem = new javax.swing.JMenuItem(); exitMenuItem = new javax.swing.JMenuItem(); editMenu = new javax.swing.JMenu(); cutMenuItem = new javax.swing.JMenuItem(); copyMenuItem = new javax.swing.JMenuItem(); pasteMenuItem = new javax.swing.JMenuItem(); deleteMenuItem = new javax.swing.JMenuItem(); helpMenu = new javax.swing.JMenu(); contentMenuItem = new javax.swing.JMenuItem(); aboutMenuItem = new javax.swing.JMenuItem(); jMenuItem1 = new javax.swing.JMenuItem(); jMenu1 = new javax.swing.JMenu(); jMenuItem2 = new javax.swing.JMenuItem(); jMenuItem3 = new javax.swing.JMenuItem(); jMenu2 = new javax.swing.JMenu(); jMenuItem4 = new javax.swing.JMenuItem(); jMenu3 = new javax.swing.JMenu(); jMenuItem5 = new javax.swing.JMenuItem();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("PayRoll Management System");

d1.setBackground(new java.awt.Color(91, 147, 137));

menuBar.setBackground(new java.awt.Color(221, 236, 184)); menuBar.setFont(new java.awt.Font("Garamond", 0, 14));

fileMenu.setText("Personnel Management");

openMenuItem.setText("Register New Personnel"); openMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { openMenuItemActionPerformed(evt); } }); fileMenu.add(openMenuItem);

saveMenuItem.setText("Search Personnel Details"); saveMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveMenuItemActionPerformed(evt); } }); fileMenu.add(saveMenuItem);

exitMenuItem.setText("Delete Existing Personnel"); exitMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exitMenuItemActionPerformed(evt); } }); fileMenu.add(exitMenuItem);

menuBar.add(fileMenu);

editMenu.setText("Salary Management");

cutMenuItem.setText("Add Salary Details"); cutMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cutMenuItemActionPerformed(evt); } }); editMenu.add(cutMenuItem);

copyMenuItem.setText("Search Salary Details"); copyMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { copyMenuItemActionPerformed(evt); } }); editMenu.add(copyMenuItem);

pasteMenuItem.setText("Update Salary Details"); pasteMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { pasteMenuItemActionPerformed(evt); } }); editMenu.add(pasteMenuItem);

deleteMenuItem.setText("Delete Salary Details"); deleteMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { deleteMenuItemActionPerformed(evt); } }); editMenu.add(deleteMenuItem);

menuBar.add(editMenu);

helpMenu.setText("Tax Management");

contentMenuItem.setText("Calculate Tax"); contentMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { contentMenuItemActionPerformed(evt); } }); helpMenu.add(contentMenuItem);

aboutMenuItem.setText("Search Tax Details"); aboutMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { aboutMenuItemActionPerformed(evt); } }); helpMenu.add(aboutMenuItem);

jMenuItem1.setText("Remove Tax Details"); jMenuItem1.setName("jMenuItem1"); // NOI18N jMenuItem1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem1ActionPerformed(evt); } }); helpMenu.add(jMenuItem1);

menuBar.add(helpMenu);

jMenu1.setText("Administrator");

jMenuItem2.setText("Add User"); jMenuItem2.setName("jMenuItem2"); // NOI18N jMenuItem2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem2ActionPerformed(evt); } }); jMenu1.add(jMenuItem2);

jMenuItem3.setText("Remove User"); jMenuItem3.setName("jMenuItem3"); // NOI18N jMenuItem3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem3ActionPerformed(evt); } }); jMenu1.add(jMenuItem3);

menuBar.add(jMenu1);

jMenu2.setText("About Us"); jMenu2.setName("jMenu2"); // NOI18N

jMenuItem4.setText("Click Here"); jMenuItem4.setName("jMenuItem4"); // NOI18N jMenuItem4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem4ActionPerformed(evt); } }); jMenu2.add(jMenuItem4);

menuBar.add(jMenu2);

jMenu3.setText("Log out"); jMenu3.setName("jMenu3"); // NOI18N

jMenuItem5.setText("Log Out"); jMenuItem5.setName("jMenuItem5"); // NOI18N jMenuItem5.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem5ActionPerformed(evt); } }); jMenu3.add(jMenuItem5);

menuBar.add(jMenu3);

setJMenuBar(menuBar);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(d1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 743, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(d1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 504, Short.MAX_VALUE) );

pack(); }//

private void exitMenuItemActionPerformed(java.awt.event.ActionEvent evt) { removepersonal pp=new removepersonal(); d1.add(pp); pp.setVisible(true); }

private void openMenuItemActionPerformed(java.awt.event.ActionEvent evt) { addpersonal ap=new addpersonal();d1.add(ap);ap.setVisible(true); // TODO add your handling code here: }

private void saveMenuItemActionPerformed(java.awt.event.ActionEvent evt) { searchpersonal sp=new searchpersonal();d1.add(sp);sp.setVisible(true); // TODO add your handling code here: }

private void cutMenuItemActionPerformed(java.awt.event.ActionEvent evt) { Addsal al=new Addsal();d1.add(al);al.setVisible(true);

// TODO add your handling code here: }

private void copyMenuItemActionPerformed(java.awt.event.ActionEvent evt) { Searchpay sp=new Searchpay();d1.add(sp);sp.setVisible(true); // TODO add your handling code here: }

private void pasteMenuItemActionPerformed(java.awt.event.ActionEvent evt) { updatepay up=new updatepay();d1.add(up);up.setVisible(true); // TODO add your handling code here: }

private void deleteMenuItemActionPerformed(java.awt.event.ActionEvent evt) { removepay rp=new removepay();d1.add(rp);rp.setVisible(true); // TODO add your handling code here: }

private void contentMenuItemActionPerformed(java.awt.event.ActionEvent evt) { addtax ax=new addtax();d1.add(ax);ax.setVisible(true); // TODO add your handling code here: }

private void aboutMenuItemActionPerformed(java.awt.event.ActionEvent evt) { searchtax ax=new searchtax();d1.add(ax);ax.setVisible(true); // TODO add your handling code here: }

private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) { removetax rt=new removetax();d1.add(rt);rt.setVisible(true); // TODO add your handling code here: }

private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {

Aduser au=new Aduser(); d1.add(au); au.setVisible(true); // TODO add your handling code here: }

private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) { RemoveUser rv=new RemoveUser();d1.add(rv);rv.setVisible(true); // TODO add your handling code here: }

private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) { this.setVisible(false); LogIn ln=new LogIn();ln.setVisible(true); // TODO add your handling code here: }

private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) { About b=new About();d1.add(b);b.setVisible(true); // TODO add your handling code here: }

/** * @param args the command line arguments */ public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new mdi().setVisible(true); } }); }

// Variables declaration - do not modify private javax.swing.JMenuItem aboutMenuItem; private javax.swing.JMenuItem contentMenuItem; private javax.swing.JMenuItem copyMenuItem; private javax.swing.JMenuItem cutMenuItem; private javax.swing.JDesktopPane d1; private javax.swing.JMenuItem deleteMenuItem; private javax.swing.JMenu editMenu; private javax.swing.JMenuItem exitMenuItem; private javax.swing.JMenu fileMenu; private javax.swing.JMenu helpMenu; private javax.swing.JMenu jMenu1; private javax.swing.JMenu jMenu2; private javax.swing.JMenu jMenu3; private javax.swing.JMenuItem jMenuItem1; private javax.swing.JMenuItem jMenuItem2; private javax.swing.JMenuItem jMenuItem3; private javax.swing.JMenuItem jMenuItem4; private javax.swing.JMenuItem jMenuItem5; private javax.swing.JMenuBar menuBar; private javax.swing.JMenuItem openMenuItem; private javax.swing.JMenuItem pasteMenuItem; private javax.swing.JMenuItem saveMenuItem; // End of variables declaration

}

/* * To change this template, choose Tools | Templates * and open the template in the editor. */

/* * LogIn.java * * Created on May 14, 2012, 7:34:13 PM */

package rol;import java.sql.*;import java.lang.String.*;import javax.swing.JOptionPane;/** * * @author Administrator */public class LogIn extends javax.swing.JFrame {

/** Creates new form LogIn */ public LogIn() { initComponents(); }

/** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // private void initComponents() {

jPanel2 = new javax.swing.JPanel(); jPanel1 = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); tid = new javax.swing.JTextField(); tpwd = new javax.swing.JPasswordField(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel5 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jButton3 = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel();

jPanel2.setName("jPanel2"); // NOI18N

javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 100, Short.MAX_VALUE) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 100, Short.MAX_VALUE) );

setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("PayRoll System"); setBackground(new java.awt.Color(51, 255, 0));

jPanel1.setBackground(new java.awt.Color(102, 102, 102)); jPanel1.setForeground(new java.awt.Color(51, 0, 51)); jPanel1.setName("jPanel1"); // NOI18N

jLabel2.setFont(new java.awt.Font("Aharoni", 0, 18)); jLabel2.setForeground(new java.awt.Color(255, 255, 255)); jLabel2.setText("User Name"); jLabel2.setName("jLabel2"); // NOI18N

jLabel3.setFont(new java.awt.Font("Aharoni", 0, 18)); jLabel3.setForeground(new java.awt.Color(255, 255, 255)); jLabel3.setText("Password"); jLabel3.setName("jLabel3"); // NOI18N

tid.setBackground(new java.awt.Color(255, 255, 204)); tid.setFont(new java.awt.Font("Aharoni", 0, 18)); tid.setForeground(new java.awt.Color(0, 0, 255)); tid.setName("tid"); // NOI18N

tpwd.setBackground(new java.awt.Color(255, 255, 204)); tpwd.setFont(new java.awt.Font("Aharoni", 0, 18)); tpwd.setForeground(new java.awt.Color(0, 0, 255)); tpwd.setName("tpwd"); // NOI18N tpwd.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { tpwdActionPerformed(evt); } });

jButton1.setBackground(new java.awt.Color(204, 204, 204)); jButton1.setFont(new java.awt.Font("Garamond", 1, 14)); jButton1.setText("Sign In"); jButton1.setName("jButton1"); // NOI18N jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } });

jButton2.setBackground(new java.awt.Color(204, 204, 204)); jButton2.setFont(new java.awt.Font("Garamond", 1, 14)); jButton2.setText("Reset"); jButton2.setName("jButton2"); // NOI18N jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } });

jLabel5.setFont(new java.awt.Font("Garamond", 1, 24)); jLabel5.setIcon(new javax.swing.ImageIcon("D:\\pay\\payroll_management_02_5.jpg")); // NOI18N jLabel5.setText("PayRoll Mgmt System"); jLabel5.setName("jLabel5"); // NOI18N

jLabel4.setFont(new java.awt.Font("Aharoni", 0, 14)); jLabel4.setForeground(new java.awt.Color(0, 255, 204)); jLabel4.setIcon(new javax.swing.ImageIcon("D:\\pay\\Untitled16.png")); // NOI18N jLabel4.setText("Forget Password ?"); jLabel4.setName("jLabel4"); // NOI18N

jButton3.setBackground(new java.awt.Color(204, 204, 204)); jButton3.setText("Get New Here"); jButton3.setName("jButton3"); // NOI18N jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } });

jLabel1.setIcon(new javax.swing.ImageIcon("D:\\pay\\Payroll-management (2).jpg")); // NOI18N jLabel1.setText("jLabel1"); jLabel1.setBorder(new javax.swing.border.MatteBorder(null)); jLabel1.setName("jLabel1"); // NOI18N

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(37, 37, 37) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jButton2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 326, Short.MAX_VALUE)) .addGap(94, 94, 94) .addComponent(jButton3)) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(76, 76, 76) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(34, 34, 34)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(tpwd, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(tid, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(60, 60, 60) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(58, 58, 58) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 961, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(tid, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(tpwd, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4)) .addGap(8, 8, 8) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1) .addComponent(jButton3)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel5)) .addGap(428, 428, 428)) );

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 519, javax.swing.GroupLayout.PREFERRED_SIZE) );

pack(); }//

private void tpwdActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: }

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { String id=tid.getText().trim();String pwd=tpwd.getText().trim();

if(id.length()==0) { JOptionPane.showMessageDialog(null,"Enter User Name");

} else if(pwd.length() == 0) { JOptionPane.showMessageDialog(null,"Enter the Password"); } else try{Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");Connection con=DriverManager.getConnection("jdbc:odbc:pay");PreparedStatement ps;ps=con.prepareStatement("select * from log where uname=?");ps.setString(1,id);ResultSet res=ps.executeQuery();if(res.next()){String str=res.getString(2).trim();if(str.equals(pwd)){JOptionPane.showMessageDialog(null,"Valid User");this.setVisible(false); mdi md=new mdi(); md.setVisible(true); }else{JOptionPane.showMessageDialog(null,"Invalid Password");}

}else{JOptionPane.showMessageDialog(null,"Invalid User Name");}

}catch (Exception ex){JOptionPane.showMessageDialog(null,ex.toString());} // TODO add your handling code here: }

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { tid.setText("");tpwd.setText("");// TODO add your handling code here: }

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) { this.setVisible(false);updatepass pass=new updatepass();pass.setVisible(true); // TODO add your handling code here: }

/** * @param args the command line arguments */ public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new LogIn().setVisible(true); } }); }

// Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JButton jButton3; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; private javax.swing.JTextField tid; private javax.swing.JPasswordField tpwd; // End of variables declaration

}

/* * To change this template, choose Tools | Templates * and open the template in the editor. */

/* * About.java * * Created on Jun 10, 2012, 6:07:51 PM */

package rol;

/** * * @author Shubham Barnwal */public class About extends javax.swing.JInternalFrame {

/** Creates new form About */ public About() { initComponents(); }

/** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // private void initComponents() {

jSeparator1 = new javax.swing.JSeparator(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jSeparator2 = new javax.swing.JSeparator(); jLabel9 = new javax.swing.JLabel();

jSeparator1.setName("jSeparator1"); // NOI18N

setBackground(new java.awt.Color(102, 102, 102)); setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(153, 0, 0))); setClosable(true); setIconifiable(true); setTitle("Payroll Management System");

jLabel1.setBackground(new java.awt.Color(0, 0, 0)); jLabel1.setFont(new java.awt.Font("Garamond", 1, 24)); // NOI18N jLabel1.setForeground(new java.awt.Color(51, 255, 51)); jLabel1.setIcon(new javax.swing.ImageIcon("D:\\pay\\Untitled5.png")); // NOI18N jLabel1.setName("jLabel1"); // NOI18N

jLabel2.setBackground(new java.awt.Color(0, 0, 0)); jLabel2.setFont(new java.awt.Font("Aharoni", 1, 24)); // NOI18N jLabel2.setForeground(new java.awt.Color(255, 255, 255)); jLabel2.setText("Compatible for all Windows Operating Systems"); jLabel2.setName("jLabel2"); // NOI18N

jLabel3.setFont(new java.awt.Font("Aharoni", 1, 24)); jLabel3.setForeground(new java.awt.Color(0, 255, 204)); jLabel3.setText("Developed By:"); jLabel3.setName("jLabel3"); // NOI18N

jLabel4.setBackground(new java.awt.Color(0, 22, 31)); jLabel4.setFont(new java.awt.Font("Aharoni", 0, 18)); jLabel4.setForeground(new java.awt.Color(255, 255, 255)); jLabel4.setText("Shubham Barnwal"); jLabel4.setName("jLabel4"); // NOI18N

jLabel5.setBackground(new java.awt.Color(0, 22, 31)); jLabel5.setFont(new java.awt.Font("Aharoni", 0, 18)); jLabel5.setForeground(new java.awt.Color(255, 255, 255)); jLabel5.setText("Sunil Krishna Saxena"); jLabel5.setName("jLabel5"); // NOI18N

jLabel6.setBackground(new java.awt.Color(0, 22, 31)); jLabel6.setFont(new java.awt.Font("Aharoni", 0, 18)); jLabel6.setForeground(new java.awt.Color(255, 255, 255)); jLabel6.setText("Shivam Rastogi"); jLabel6.setName("jLabel6"); // NOI18N

jLabel7.setBackground(new java.awt.Color(0, 22, 31)); jLabel7.setFont(new java.awt.Font("Aharoni", 0, 18)); jLabel7.setForeground(new java.awt.Color(255, 255, 255)); jLabel7.setText("Prashant Gangwar"); jLabel7.setName("jLabel7"); // NOI18N

jLabel8.setFont(new java.awt.Font("Aharoni", 0, 18)); // NOI18N jLabel8.setForeground(new java.awt.Color(240, 240, 240)); jLabel8.setText("Version 1.1"); jLabel8.setName("jLabel8"); // NOI18N

jSeparator2.setName("jSeparator2"); // NOI18N

jLabel9.setIcon(new javax.swing.ImageIcon("D:\\pay\\payroll-homebanner.jpg")); // NOI18N jLabel9.setText("jLabel9"); jLabel9.setName("jLabel9"); // NOI18N

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(35, 35, 35) .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 699, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(32, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(356, Short.MAX_VALUE) .addComponent(jLabel8) .addGap(322, 322, 322)) .addGroup(layout.createSequentialGroup() .addGap(103, 103, 103) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(jLabel2)) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jSeparator2)) .addContainerGap(96, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(322, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4) .addComponent(jLabel3)) .addGap(15, 15, 15)) .addComponent(jLabel5) .addGroup(layout.createSequentialGroup() .addComponent(jLabel6) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 52, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 3, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(261, 261, 261)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 163, Short.MAX_VALUE) .addGap(11, 11, 11) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(11, 11, 11) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel8) .addGap(26, 26, 26) .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 11, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel4) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel6) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(42, 42, 42)) );

pack(); }//

// Variables declaration - do not modify private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel7; private javax.swing.JLabel jLabel8; private javax.swing.JLabel jLabel9; private javax.swing.JSeparator jSeparator1; private javax.swing.JSeparator jSeparator2; // End of variables declaration

}

/* * To change this template, choose Tools | Templates * and open the template in the editor. */

/* * Addsal.java * * Created on Jun 10, 2012, 1:09:05 AM */

package rol;import java.sql.*;import javax.swing.JOptionPane;import java.lang.String.*;/** * * @author Shubham */public class Addsal extends javax.swing.JInternalFrame {

/** Creates new form Addsal */ public Addsal() { initComponents(); }

/** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // private void initComponents() {

jTextField5 = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); jLabel11 = new javax.swing.JLabel(); jLabel12 = new javax.swing.JLabel(); r1 = new javax.swing.JTextField(); r2 = new javax.swing.JTextField(); r3 = new javax.swing.JTextField(); r4 = new javax.swing.JTextField(); r5 = new javax.swing.JComboBox(); r6 = new javax.swing.JTextField(); r7 = new javax.swing.JTextField(); r8 = new javax.swing.JTextField(); r9 = new javax.swing.JTextField(); r10 = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); jButton4 = new javax.swing.JButton(); jSeparator1 = new javax.swing.JSeparator(); jSeparator2 = new javax.swing.JSeparator(); jSeparator3 = new javax.swing.JSeparator();

jTextField5.setText("jTextField5"); jTextField5.setName("jTextField5"); // NOI18N

setBackground(new java.awt.Color(102, 102, 102)); setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(153, 0, 0))); setClosable(true); setIconifiable(true); setTitle("Payroll Management System");

jLabel1.setFont(new java.awt.Font("Garamond", 1, 24)); jLabel1.setIcon(new javax.swing.ImageIcon("D:\\pay\\Untitled3.png")); // NOI18N jLabel1.setName("jLabel1"); // NOI18N

jLabel2.setFont(new java.awt.Font("Aharoni", 0, 18)); jLabel2.setForeground(new java.awt.Color(255, 255, 255)); jLabel2.setText("Slip No."); jLabel2.setName("jLabel2"); // NOI18N

jLabel3.setFont(new java.awt.Font("Aharoni", 0, 18)); jLabel3.setForeground(new java.awt.Color(255, 255, 255)); jLabel3.setText("Personnel Id"); jLabel3.setName("jLabel3"); // NOI18N

jLabel4.setFont(new java.awt.Font("Aharoni", 0, 18)); jLabel4.setForeground(new java.awt.Color(255, 255, 255)); jLabel4.setText("Personnel Name"); jLabel4.setName("jLabel4"); // NOI18N

jLabel5.setFont(new java.awt.Font("Aharoni", 0, 18)); jLabel5.setForeground(new java.awt.Color(255, 255, 255)); jLabel5.setText("Post"); jLabel5.setName("jLabel5"); // NOI18N

jLabel6.setFont(new java.awt.Font("Aharoni", 0, 18)); jLabel6.setForeground(new java.awt.Color(255, 255, 255)); jLabel6.setText("Month"); jLabel6.setName("jLabel6"); // NOI18N

jLabel7.setFont(new java.awt.Font("Aharoni", 0, 18)); jLabel7.setForeground(new java.awt.Color(255, 255, 255)); jLabel7.setText("No. Of Working Days"); jLabel7.setName("jLabel7"); // NOI18N

jLabel8.setFont(new java.awt.Font("Aharoni", 0, 18)); jLabel8.setForeground(new java.awt.Color(255, 255, 255)); jLabel8.setText("Salary"); jLabel8.setName("jLabel8"); // NOI18N

jLabel9.setName("jLabel9"); // NOI18N

jLabel10.setFont(new java.awt.Font("Aharoni", 0, 18)); jLabel10.setForeground(new java.awt.Color(255, 255, 255)); jLabel10.setText("Total Salary"); jLabel10.setName("jLabel10"); // NOI18N

jLabel11.setFont(new java.awt.Font("Aharoni", 0, 18)); jLabel11.setForeground(new java.awt.Color(255, 255, 255)); jLabel11.setText("DA"); jLabel11.setName("jLabel11"); // NOI18N

jLabel12.setFont(new java.awt.Font("Aharoni", 0, 18)); jLabel12.setForeground(new java.awt.Color(255, 255, 255)); jLabel12.setText("HRA"); jLabel12.setName("jLabel12"); // NOI18N

r1.setBackground(new java.awt.Color(255, 255, 204)); r1.setFont(new java.awt.Font("Aharoni", 0, 12)); r1.setForeground(new java.awt.Color(51, 51, 255)); r1.setName("r1"); // NOI18N

r2.setBackground(new java.awt.Color(255, 255, 204)); r2.setFont(new java.awt.Font("Aharoni", 0, 12)); r2.setForeground(new java.awt.Color(51, 51, 255)); r2.setName("r2"); // NOI18N

r3.setBackground(new java.awt.Color(255, 255, 204)); r3.setFont(new java.awt.Font("Aharoni", 0, 12)); r3.setForeground(new java.awt.Color(51, 51, 255)); r3.setName("r3"); // NOI18N

r4.setBackground(new java.awt.Color(255, 255, 204)); r4.setFont(new java.awt.Font("Aharoni", 0, 12)); r4.setForeground(new java.awt.Color(51, 51, 255)); r4.setName("r4"); // NOI18N

r5.setBackground(new java.awt.Color(255, 255, 204)); r5.setFont(new java.awt.Font("Aharoni", 0, 12)); r5.setForeground(new java.awt.Color(51, 51, 255)); r5.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1.January", "2. Febuary", "3. March", "4. Appril", "5. May", "6. June", "7. Jully", "8. August", "9. September", "10.October", "11. November", "12. December" })); r5.setName("r5"); // NOI18N

r6.setBackground(new java.awt.Color(255, 255, 204)); r6.setFont(new java.awt.Font("Aharoni", 0, 12)); r6.setForeground(new java.awt.Color(51, 51, 255)); r6.setName("r6"); // NOI18N

r7.setBackground(new java.awt.Color(255, 255, 204)); r7.setFont(new java.awt.Font("Aharoni", 0, 12)); r7.setForeground(new java.awt.Color(51, 51, 255)); r7.setName("r7"); // NOI18N

r8.setBackground(new java.awt.Color(255, 255, 204)); r8.setFont(new java.awt.Font("Aharoni", 0, 12)); r8.setForeground(new java.awt.Color(51, 51, 255)); r8.setName("r8"); // NOI18N

r9.setBackground(new java.awt.Color(255, 255, 204)); r9.setFont(new java.awt.Font("Aharoni", 0, 12)); r9.setForeground(new java.awt.Color(51, 51, 255)); r9.setName("r9"); // NOI18N

r10.setBackground(new java.awt.Color(255, 255, 204)); r10.setFont(new java.awt.Font("Aharoni", 0, 12)); r10.setForeground(new java.awt.Color(51, 51, 255)); r10.setName("r10"); // NOI18N r10.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { r10ActionPerformed(evt); } });

jButton1.setBackground(new java.awt.Color(204, 204, 204)); jButton1.setText("Calculate Total Salary"); jButton1.setName("jButton1"); // NOI18N jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } });

jButton2.setBackground(new java.awt.Color(204, 204, 204)); jButton2.setText("Add Pay"); jButton2.setName("jButton2"); // NOI18N jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } });

jButton3.setBackground(new java.awt.Color(204, 204, 204)); jButton3.setText("Reset"); jButton3.setName("jButton3"); // NOI18N jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } });

jButton4.setBackground(new java.awt.Color(204, 204, 204)); jButton4.setText("Cancel"); jButton4.setName("jButton4"); // NOI18N jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton4ActionPerformed(evt); } });

jSeparator1.setName("jSeparator1"); // NOI18N

jSeparator2.setName("jSeparator2"); // NOI18N

jSeparator3.setName("jSeparator3"); // NOI18N

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(162, 162, 162) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel11) .addComponent(jLabel12) .addComponent(jLabel8)) .addGap(177, 177, 177)) .addGroup(layout.createSequentialGroup() .addComponent(jLabel7) .addGap(49, 49, 49))) .addComponent(jLabel2) .addComponent(jLabel3) .addComponent(jLabel4) .addComponent(jLabel5) .addComponent(jLabel6)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(r6, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(128, 128, 128)) .addGroup(layout.createSequentialGroup() .addComponent(r5, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(128, Short.MAX_VALUE))) .addGroup(layout.createSequentialGroup() .addComponent(r4, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) .addGroup(layout.createSequentialGroup() .addComponent(r2, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())) .addGroup(layout.createSequentialGroup() .addComponent(r1, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())) .addGroup(layout.createSequentialGroup() .addComponent(r7, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())) .addGroup(layout.createSequentialGroup() .addComponent(r8, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())) .addGroup(layout.createSequentialGroup() .addComponent(r9, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())) .addGroup(layout.createSequentialGroup() .addComponent(r3, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()))) .addGroup(layout.createSequentialGroup() .addGap(168, 168, 168) .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(92, 92, 92) .addComponent(r10, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(128, 128, 128)) .addGroup(layout.createSequentialGroup() .addGap(32, 32, 32) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1) .addContainerGap()) .addGroup(layout.createSequentialGroup() .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(94, 94, 94) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jSeparator3, javax.swing.GroupLayout.DEFAULT_SIZE, 423, Short.MAX_VALUE) .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 423, Short.MAX_VALUE) .addComponent(jSeparator2, javax.swing.GroupLayout.DEFAULT_SIZE, 423, Short.MAX_VALUE) .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 423, Short.MAX_VALUE) .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, 423, Short.MAX_VALUE) .addComponent(jButton4, javax.swing.GroupLayout.DEFAULT_SIZE, 423, Short.MAX_VALUE)) .addGap(106, 106, 106)))) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(29, 29, 29) .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(r1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent(r2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(20, 20, 20) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent(r3, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(17, 17, 17) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5) .addComponent(r4, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(11, 11, 11) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel6) .addComponent(r5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel7) .addComponent(r6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(7, 7, 7) .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel8) .addComponent(r7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel11) .addComponent(r8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel12) .addComponent(r9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent(jButton1) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel10) .addComponent(r10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(11, 11, 11) .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 24, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton4) .addGap(16, 16, 16)) );

pack(); }//

private void r10ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: }

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { String slip=r1.getText().trim();if(slip.length()==0){JOptionPane.showMessageDialog(null,"Enter Slip No...");return;}String id=r2.getText().trim();if(id.length()==0){JOptionPane.showMessageDialog(null," Enter Employee ID..");return;}String name=r3.getText().trim();if(name.length()==0){JOptionPane.showMessageDialog(null,"Enter Employee Name..");return;}String post=r4.getText().trim();if(post.length()==0){JOptionPane.showMessageDialog(null,"Enter Employee Post");return;} String month=(String) r5.getSelectedItem(); if(month.length()==0) { JOptionPane.showMessageDialog(null,"Select month"); return; }String work=r6.getText().trim();if(work.length()==0){JOptionPane.showMessageDialog(null,"Enter No Of Working Day");return;}String sal=r7.getText().trim();if(sal.length()==0){JOptionPane.showMessageDialog(null,"Enter Employee Salaryr");return;}

String da=r8.getText().trim();if(da.length()==0){JOptionPane.showMessageDialog(null,"Enter Da");return;} String hra=r9.getText().trim();if(hra.length()==0){JOptionPane.showMessageDialog(null,"Enter Employee HRA");return;} String total=r10.getText().trim();if(total.length()==0){JOptionPane.showMessageDialog(null,"Calculate Employee Total Salary ");return;}

try{Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");Connection con;con=DriverManager.getConnection("jdbc:odbc:pay");PreparedStatement ps=con.prepareStatement("insert into sal values(?,?,?,?,?,?,?,?,?,?)");ps.setString(1,slip);ps.setString(2,id);ps.setString(3,name);ps.setString(4,post);ps.setString(5,month);ps.setString(6,work); ps.setString(7,sal);ps.setString(8,da);ps.setString(9,hra); ps.setString(10,total); int i=ps.executeUpdate();if(i>0){JOptionPane.showMessageDialog(null,"Eployee Details Add");}else{JOptionPane.showMessageDialog(null,"Record not Save");}}catch (Exception ex){JOptionPane.showMessageDialog(null,ex.toString());

} // TODO add your handling code here: }

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

int d,h,s,sum; String sal=r7.getText(); String da=r8.getText(); String hra=r9.getText(); d=Integer.parseInt(da); h=Integer.parseInt(hra); s=Integer.parseInt(sal); sum=(d+h+s);

String str=String.valueOf(sum); r10.setText(str); // TODO add yourhandling code here: }

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {

r1.setText(""); r2.setText(""); r3.setText(""); r4.setText(""); r6.setText(""); r7.setText(""); r8.setText(""); r9.setText(""); r10.setText("");

// TODO add your handling code here: }

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {

this.setVisible(false); // TODO add your handling code here: }

// Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JButton jButton3; private javax.swing.JButton jButton4; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel10; private javax.swing.JLabel jLabel11; private javax.swing.JLabel jLabel12; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel7; private javax.swing.JLabel jLabel8; private javax.swing.JLabel jLabel9; private javax.swing.JSeparator jSeparator1; private javax.swing.JSeparator jSeparator2; private javax.swing.JSeparator jSeparator3; private javax.swing.JTextField jTextField5; private javax.swing.JTextField r1; private javax.swing.JTextField r10; private javax.swing.JTextField r2; private javax.swing.JTextField r3; private javax.swing.JTextField r4; private javax.swing.JComboBox r5; private javax.swing.JTextField r6; private javax.swing.JTextField r7; private javax.swing.JTextField r8; private javax.swing.JTextField r9; // End of variables declaration

}

/* * To change this template, choose Tools | Templates * and open the template in the editor. */

/* * Aduser.java * * Created on May 19, 2012, 8:35:13 AM */

package rol;import java.sql.*;import javax.swing.JOptionPane;import java.lang.String.*;/** * * @author Administrator */public class Aduser extends javax.swing.JInternalFrame {

/** Creates new form Aduser */ public Aduser() { initComponents(); }

/** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // private void initComponents() {

jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); ad1 = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel(); ad2 = new javax.swing.JPasswordField(); ad3 = new javax.swing.JPasswordField(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jButton3 = new javax.swing.JButton(); jSeparator1 = new javax.swing.JSeparator(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel();

setBackground(new java.awt.Color(102, 102, 102)); setClosable(true); setIconifiable(true); setMaximizable(true); setTitle("Payroll Management System");

jLabel1.setFont(new java.awt.Font("Aharoni", 0, 18)); jLabel1.setForeground(new java.awt.Color(255, 255, 255)); jLabel1.setText("User Name"); jLabel1.setName("jLabel1"); // NOI18N

jLabel2.setFont(new java.awt.Font("Aharoni", 0, 18)); jLabel2.setForeground(new java.awt.Color(255, 255, 255)); jLabel2.setText("Password"); jLabel2.setName("jLabel2"); // NOI18N

ad1.setBackground(new java.awt.Color(255, 255, 204)); ad1.setFont(new java.awt.Font("Aharoni", 0, 18)); ad1.setForeground(new java.awt.Color(0, 0, 255)); ad1.setName("ad1"); // NOI18N

jButton1.setBackground(new java.awt.Color(204, 204, 204)); jButton1.setFont(new java.awt.Font("Garamond", 1, 14)); // NOI18N jButton1.setText("Register"); jButton1.setName("jButton1"); // NOI18N jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } });

jButton2.setBackground(new java.awt.Color(204, 204, 204)); jButton2.setFont(new java.awt.Font("Garamond", 1, 14)); jButton2.setText("Reset"); jButton2.setName("jButton2"); // NOI18N jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } });

jLabel3.setFont(new java.awt.Font("Elephant", 0, 18)); // NOI18N jLabel3.setIcon(new javax.swing.ImageIcon("D:\\pay\\Untitled15.png")); // NOI18N jLabel3.setText(" Add New User"); jLabel3.setName("jLabel3"); // NOI18N

ad2.setBackground(new java.awt.Color(255, 255, 204)); ad2.setFont(new java.awt.Font("Aharoni", 0, 18)); ad2.setForeground(new java.awt.Color(0, 0, 255)); ad2.setName("ad2"); // NOI18N

ad3.setBackground(new java.awt.Color(255, 255, 204)); ad3.setFont(new java.awt.Font("Aharoni", 0, 18)); ad3.setForeground(new java.awt.Color(0, 0, 255)); ad3.setName("ad3"); // NOI18N ad3.addInputMethodListener(new java.awt.event.InputMethodListener() { public void caretPositionChanged(java.awt.event.InputMethodEvent evt) { } public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) { ad3InputMethodTextChanged(evt); } });

jLabel4.setFont(new java.awt.Font("Aharoni", 0, 18)); jLabel4.setForeground(new java.awt.Color(255, 255, 255)); jLabel4.setText("Confirm Password"); jLabel4.setName("jLabel4"); // NOI18N

jLabel5.setIcon(