title: Using JRadioButton for selecting gender
body: <p>I am developing a Java desktop app.I need to implement gender selection (male or female) using <code>JRadioButton</code> .I have two <code>JRadioButttons</code> .But my problem is that here I can select both <code>JRadioButtons</code>.How can i restrict this ?</p>
  
  <p>that is I need to select only one at a time.</p>
  
  <p>here is my code snippet </p>
  
  <pre><code>     JRadioButton male=new JRadioButton();
       raillabel.add(male);
       male.setBounds(150,152,25,25);
       JRadioButton female=new JRadioButton();
       raillabel.add(female);
       female.setBounds(260,152,25,25);
  </code></pre>
  
  <p>How can i resolve this issue any idea ?</p>