title: For some reason, my JPanel is not showing up
body: <p>This is my code</p>
  
  <pre><code>import javax.swing.*;
  import java.awt.*;
  import java.awt.Graphics;
  public class Test extends JFrame{
      private JButton by;
      private JButton bn;
      JLabel startQuestion;
  
      public Test() {
          JPanel p = new JPanel();
          by = new JButton("Yes");
          bn = new JButton("No");
          startQuestion = new JLabel("Would you like to start?");
          p.setLayout(null);
          by.setBounds(180, 250, 70, 45);
          bn.setBounds(250, 250, 70, 45);
          startQuestion.setLocation(195, 240);
          p.add(by);
          p.add(bn);
          add(startQuestion);
          add(p);
          setDefaultCloseOperation(3);
          setSize(500, 500);
          setVisible(true);
      }
  
      public static void main(String...args) {
          new Test();
      }
  }
  </code></pre>
  
  <p>There are no syntax errors, however my Jlabel is not added (the buttons work fine). I do not want to change the layout from null, as I want to be able to define the positions of the buttons and labels. Does anyone know why this isn't working?</p>