title: Why is JRadioButton not being displayed on the JPanel?
body: <p>I am new to Java Graphic Design and wanted to implement a Radio Button Menu, however the radio button is not visible and is still somehow covering up the graphics below it.</p>
  
  <p>I thought that it was not being displayed due to setVisible being set to false, but even that did not work.</p>
  
  <pre class="lang-java prettyprint-override"><code>public class Panel extends JPanel implements ActionListener {
      JFrame frame;
      JRadioButton rb;
  
      Panel() {
          setLayout(null);
          addMouseListener(this);
  
          // Creating Frame
          frame = new JFrame();
          frame.setContentPane(this);
          frame.setTitle("Testing Stuff");
          frame.getContentPane().setPreferredSize(new Dimension(600, 600));
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.pack();
          frame.setLocationRelativeTo(null);
          frame.setVisible(true);
  
          // Creating the radio button
          rb = new JRadioButton();
          rb.setText("Button 1 Text");
          rb.setName("Button 1 Name");
          rb.setSelected(true);
          rb.setVisible(true);
  
          rb.setActionCommand("Button 1 Clicked");
          rb.addActionListener(this); 
  
  // Adding the radio button
          add(rb);
      }
  }
  
  </code></pre>
  
  <p>Where is the probelm in my code?</p>