Employee Information System
#4

[attachment=15570]
Code:
import javax.swing.*;
import javax.swing.ImageIcon.*;
import javax.swing.JPanel.*;
import javax.swing.JOptionPane;
import java.awt.*;
import java.awt.event.*;
import java.lang.*;
import javax.swing.*;
import javax.swing.border.*;
import java.sql.*;

public class AllowancesRecord extends JDialog implements ActionListener
{
JButton b1,b2;
JTextField  textField1,textField2,textField3,textField4,textField5;
JLabel label1,label2,label3,label4,label5;


  public AllowancesRecord() {
            setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);
            Toolkit theKit=getToolkit();
            Dimension wndSize=theKit.getScreenSize();
            
        
            
            setBounds(5,10,790,550);
            GridLayout grid=new GridLayout(10,2,10,20);
            Container content=getContentPane();
            content.setLayout(grid);
            EtchedBorder edge=new EtchedBorder(EtchedBorder.RAISED);
                                                                    

label1=new JLabel("Employee ID");
label2=new JLabel("House Rent");
label3=new JLabel("Convence");
label4=new JLabel("Medical");
label5=new JLabel("Telecomm");


textField1=new JTextField();
textField2=new JTextField();
textField3=new JTextField();
textField4=new JTextField();
textField5=new JTextField();

b1=new JButton("cancel");
b2=new JButton("save");


            b1.setBorder(edge);
            b2.setBorder(edge);
    
            content.add(textField1);
            content.add(label1);
            content.add(textField2);
            content.add(label2);
            content.add(textField3);
            content.add(label3);
                    content.add(textField4);
                    content.add(label4);
                    content.add(textField5);
                    content.add(label5);
                
                    
                    content.add(b1);
                    content.add(b2);
            setVisible(true);
                                
                                    
             b1.addActionListener(this);
             b2.addActionListener(this);
            



                }
public void actionPerformed(ActionEvent ae)
    
    
     {  
    
          Object source=ae.getSource();
    

        if (ae.getActionCommand().equals("cancel")||source==b1)
           {
        
               System.exit(0);

           }
        else if(ae.getActionCommand().equals("save")||source==b2)
        {    
        try{
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            String sourceURL="jdbc:odbc:database";
            Connection databaseConnection=DriverManager.getConnection(sourceURL);
        
            Statement statement=databaseConnection.createStatement();
            String str = "INSERT INTO Allowances(EmployeeID,HouseRent,Convency,Medical,Telecomm,AllowancesTotal) VALUES("+textField1.getText()+","+textField2.getText()+","+textField3.getText()+","+textField4.getText()+","+textField5.getText()+","+textField2.getText()+"+"+textField3.getText()+"+"+textField4.getText()+"+"+textField5.getText()+")";
            ResultSet authorNames=statement.executeQuery(str);
            
            /*if (authorNames.next())
                {
            
                   JOptionPane.showMessageDialog(null,"Information Saved");
                }
                
            else {
                    JOptionPane.showMessageDialog(null,"Invalid Password");
                }*/         

          
            }
            catch(Exception cnfe)
                {
                //System.err.println(cnfe);
                 JOptionPane.showMessageDialog(null,"Information Saved");

                }    
            
             //JOptionPane.showMessageDialog(null,"");        
            
            
            
        }
        
    
    
    
    
    
    
    }//action performed

public static void main(String args[])
{
    AllowancesRecord a=new AllowancesRecord();
}


}
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: employee information system pdf, employee information and consultation regulations, employee information system in vb net, documentation on employee information system, employee information system using javaswing, full project report on employee information management system, employee information system documentation,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Messages In This Thread
Employee Information System - by seminar topics - 24-03-2010, 07:59 PM
RE: Employee Information System - by projectsofme - 24-11-2010, 02:46 PM
RE: Employee Information System - by smart paper boy - 30-08-2011, 02:51 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  Employee Cubicle Management System full report computer science technology 4 5,149 07-04-2016, 11:37 AM
Last Post: dhanabhagya
  STUDENT INFORMATION SYSTEM IN JAVA project topics 14 10,657 19-08-2015, 11:28 PM
Last Post: Guest
  INTELLECTUAL INFORMATION SYSTEM USING GPS+GSM smart paper boy 3 2,022 10-04-2015, 09:52 AM
Last Post: seminar report asees
  ENQUIRY INFORMATION ON INSTITUTE full report seminar topics 1 2,231 10-11-2014, 09:15 PM
Last Post: Guest
  WEB PORTAL FOR STUDENT INFORMATION SYSTEM OF E.C.A smart paper boy 2 3,163 29-03-2014, 11:49 PM
Last Post: Guest
  Developing a web application to transfer image and patient information project report maker 2 3,701 21-03-2014, 01:44 AM
Last Post: MichaelPn
  Employee and Payroll Management System smart paper boy 4 4,477 04-03-2013, 11:16 AM
Last Post: seminar details
  HUMAN RESOURCE INFORMATION SYSTEMS electronics seminars 1 2,173 29-11-2012, 01:51 PM
Last Post: seminar details
  Company Information Tracking System (CITS) smart paper boy 3 2,794 29-11-2012, 01:51 PM
Last Post: seminar details
  Information Retrieval Knowledge Management System mechanical engineering crazy 4 3,471 28-11-2012, 12:53 PM
Last Post: seminar details

Forum Jump: