private javax.swing.JRadioButton female=new javax.swing.JRadioButton();
private javax.swing.JRadioButton male=new javax.swing.JRadioButton();
private javax.swing.ButtonGroup sex= new javax.swing.ButtonGroup();
sex.add(female);
sex.add(male);
String str;
if(male.isSelected())
str="M";
else if (female.isSelected())
str="F";
str will have the datails of the selected Butto
private javax.swing.JRadioButton male=new javax.swing.JRadioButton();
private javax.swing.ButtonGroup sex= new javax.swing.ButtonGroup();
sex.add(female);
sex.add(male);
String str;
if(male.isSelected())
str="M";
else if (female.isSelected())
str="F";
str will have the datails of the selected Butto
0 comments:
Post a Comment