Monday, 5 August 2013

HOW TO MAKE SALARY CALCULATOR    USE THE FOLLOWING SCRIPT IN NETBEANS AND CHANGE TEXTFEILD NAME ACORDINGLY





SCRIPT FOR CALCULATION BUTTON
                               
        float b=Float.parseFloat(txtb.getText());
        float hrr=Float.parseFloat(txthrr.getText());
        float dar=Float.parseFloat(txtdar.getText());
        float tax=Float.parseFloat(txttax.getText());
        float  hra=0,da=0,g=0,mg=0,ai=0,nsal=0,mtax=0;

        
         hra=(b*hrr)/100;
         da=(b*dar)/100;
  
        g=b+hra+da;

        ai=g*12;
        
        tax=(g*tax)/100;

       

        mtax=tax/12;
        nsal=g-mtax;

        txth.setText(""+hra);
        txtd.setText(""+da);
        txtg.setText(""+g);
        txtt.setText(""+tax);
        txtmt.setText(""+mtax);
        txtn.setText(""+nsal);




SCRIPT FOR CLEAR BUTTON

        txtb.setText("");
        txth.setText("");
        txtd.setText("");
        txtg.setText("");
        txtt.setText("");
        txtmt.setText("");
        txtn.setText("");
        txthrr.setText("");
        txtdar.setText("");
        txttax.setText("");




SCRIPT FOR EXIT BUTTON


System.exit(0);








YOU CAN DOWNLOAD ITS JAR FILE VIA FOLLOWING LINK
1. JAR FILE 



No comments:

Post a Comment