/*I have code this program in netbeans 6.5, also i have attached the file where i have wrote down my doubts about this application*/
private void CalcBtnActionPerformed(java.awt.event.ActionEvent evt) {
float vAmtTF = Float.parseFloat(AmtTF.getText());
double vDiscTF = 0;
//double vNetTF = 0;
double vDiscount = 0;
if(visaRB.isSelected())
vDiscount = 0.2;
else if(xyzRB.isSelected())
vDiscount = 0.15;
else if(abcRB.isSelected())
vDiscount = 0.1;
vDiscTF = vAmtTF*vDiscount;
DiscTF.setText(" " + vDiscTF);
NewClass.vNetTF = vAmtTF-vDiscTF;
NetTF.setText(" " + NewClass.vNetTF);
dlgLBL.setText("Your net Bill Amount is " + NewClass.vNetTF);
jDialog1.setVisible(true);
// TODO add your handling code here:
}
private void ExitBtnActionPerformed(java.awt.event.ActionEvent evt) {
new NewJFrame().dispose();
}
private void okBActionPerformed(java.awt.event.ActionEvent evt) {
jDialog1.dispose();
}
private void ClearBtnActionPerformed(java.awt.event.ActionEvent evt) {
AmtTF.setText(" ");
DiscTF.setText(" ");
NetTF.setText(" ");
// TODO add your handling code here:
}
|
| Filename |
Questions.jpg |
Download
|
| Description |
|
| Filesize |
382 Kbytes
|
| Downloaded: |
12 time(s) |
This message was edited 1 time. Last update was at 01/03/2010 07:49:16
|