article

Wednesday, July 3, 2019

Java Swing jRadioButton Usage Tutorial


Java Swing jRadioButton Usage Tutorial
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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