Jtextfield value get and calculation
Hello
This my code
Code:
<script type="text/javascript">
<!--
public void actionPerformed(ActionEvent event)
{
double income;
double net;
//double tax = 0.25;
/*String input;
input = txt1.getText();
double txt1 = Double.parseDouble(input);
input = txt2.getText();
double txt2 = Double.parseDouble(input);*/
//income = txt1 *= 0.25;
String s = txt1.getText();
String income = s ;
txt2.setText(income );
//income = (txt1 * tax);
}
}
//-->
</script>
I need to calculate tax, multiply by 0.25 and then show the result in the tax text filed.