Here,
Name is stored in jTextField1
Fee Per Quarter is stored in jTextField2
Concession Amount is stored in jTextField3
Fee to be Paid is stored in jTextField4
(i) We need to double click at the ‘Calculate Charges’ button (jButtonl) and type the following code ;
int Fee_per_quar,
concession_amount ;
float fee_tobe_paid ;
String name = jTextFieldl. getText ( ) ;
if (jRadioButtonl. isSelected ( ) = =True)
Fee_per_quar = 2000 ;
else if (jRadioButton2. isSelectedO == True) Fee_per_quar = 2500 :
else if (jRadioButton3. is Selected ( ) == True)
Fee_per_quar = 2300 ;
else
Fee, per_quar = 0 ;
jTextField2. setText (Fee_per_quar) ;
if (jCheckBox. isSelected ( ) = =True)
concession_amount = (Fee__per_quar * 7) / 100 ;
else
concession_amount = 0 ;
JTextField3. setText
(concession_amount) ;
fee_tobe_paid = Fee_per_quar - concession_amount ;
jTextField4. setText (fee_tobe_paid) ;
(ii) We need to double click at the ‘Clear’ button (jButton2) and type the following code :
jTextFieldl. setText (" ") ;
jTextField2. setText (" ") ;
jTextField3. setText (" ") ;
jTextField4. setText (" ") ;
jRadioButton1. setSelected (False) ; jRadioButton2. setSelected (False); jRadioButton3. setSelected (False) ; jCheckBox. setSelected (False) ;
(iii) We need to double click at the ‘Exit’ button (jButton3) and type the following code:
System., exit (0) ;