article

Wednesday, July 3, 2019

Java Swing jRadioButton Usage Tutorial


Java Swing jRadioButton Usage Tutorial
 
private void formWindowOpened(java.awt.event.ActionEvent evt)
  bgroup1.add(radiolicense);  
  bgroup1.add(radiolicense);
}

private void radiolicensePerformed(java.awt.event.ActionEvent evt) {
  cmdsubmit.setEnable(true);
}
private void radiolicensePerformed(java.awt.event.ActionEvent evt) {
  cmdsubmit.setEnable(false);
}
//=====================================
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
        String qual = "";
        if (jRadioButton1.isSelected()){
            qual = "Your Under Graduate";
        }else{
            qual = "Graduate";
        }
        JOptionPane.showMessageDialog(rootPane, qual);
    }

Related Post