title: JFrame layout with radio buttons
body: <p>This is my code:</p>
  
  <pre><code>frame2 = new JFrame("Confirmation");
          frame2.setLayout(new BorderLayout());
          JRadioButton y,n,c;
           panel = new JPanel();
            ButtonGroup buttonGroup = new ButtonGroup();
            y = new JRadioButton("Add");
            buttonGroup.add(y);
            panel.add(y);
            n = new JRadioButton("Update");
            buttonGroup.add(n);
            panel.add(n);
            c = new JRadioButton("Delete");
            buttonGroup.add(c);
            panel.add(c);
            y.setSelected(true);
            b1=new JButton();
            b1.setBounds(300,100,2,2);
            b1.setIcon(new ImageIcon(searchresult.class.getResource("/images/yes.png")));
            b2=new JButton();
            b2.setBounds(100,10,2,2);
            b2.setIcon(new ImageIcon(searchresult.class.getResource("/images/no.png")));
            panel.add(b1);
            panel.add(b2);
            frame2.add(panel);
            frame2.setSize(182,150);
            frame2.setVisible(true);
  </code></pre>
  
  <p>Right now this gives me the following output
  <img src="https://i.stack.imgur.com/YDy3L.jpg" alt="enter image description here"></p>
  
  <p>whereas I want this 
  <img src="https://i.stack.imgur.com/u9Iof.jpg" alt="enter image description here"></p>
  
  <p>with an increased width but I am not able to do it..Could anyone provide me with further details that could help me</p>