Monday, February 19, 2018

Java Swing Radio Button video tutorial in netbeans by Abdullah Bin Ubaidullah

Java Swing Radio Button example:


Output:
Code
here is output


Source code:

 private void showRadioBtnExampleActionPerformed(java.awt.event.ActionEvent evt) {                                                    
        maleRadioBtn.setActionCommand("Male");
        feMaleRadioBtn.setActionCommand("Female");
        JOptionPane.showMessageDialog(null,"You have selected "+buttonGroupGender.getSelection().getActionCommand());
        
    }

Watch Video Here: