title: setSelected() with JRadioButton r[]=new JRadioButton[3] not working
body: <p>Here I made a dummy Programme....</p>
  
  <pre><code>  import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class MyClass1 implements ActionListener
    {
  JFrame fr;
  JRadioButton opt[]=new JRadioButton[2];
  JButton btnext;
  JRadioButton r1;
  MyClass1()
  {
      fr=new JFrame();
      fr.setLayout(null);
      opt[0]=new JRadioButton("Hello");
      opt[1]=new JRadioButton("Welcome");
      r1=new JRadioButton("Jealsous");
      btnext=new JButton();
      ButtonGroup bg=new ButtonGroup();
      bg.add(opt[0]);
      bg.add(opt[1]);
      opt[0].setBounds(50,100,200,30);
      r1.setBounds(50,200,200,30);
      opt[1].setBounds(50,150,200,30);
      btnext.setBounds(400,350,100,30);
      fr.add(opt[1]);
      fr.add(opt[0]);
      fr.add(btnext);
      fr.add(r1);
      btnext.addActionListener(this);
      fr.setSize(800,500);
      fr.setVisible(true);
  }
   public void actionPerformed(ActionEvent e)
          {
              System.out.println(opt[0].getText());
              opt[0].setSelected(false); //not working
              r1.setSelected(false);  //working
          }
      public static void main(String[] s)
          {
              new MyClass1();
          }
      }
  </code></pre>
  
  <p>In this code when I am clicking on button the radiobutton which is an array
  opt[0] is still selected.
  Whereas radiobutton r1 is not selected  . So basically when I am calling the function setSelected with array of objects it is doing nothing, when me calling with distinct object it is working fine. In the big programme I need of array of objects so that I can use it in for loop and get it initialized to some value coming out of String 2Dimensional Array.</p>