title: Cannot add multiple JPanel in JFrame,
body: <p>I have a following JFrame.</p>
  
  <pre><code>public class AddActivityWindow extends JFrame {
  
      //declaration of components go here
       ...
      public AddActivityWindow(ActivityStore store) {
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  
          JPanel pnl_date = new JPanel();
          JLabel lbl_date = new JLabel("X");
          pnl_date.add(lbl_date);
          add(pnl_date);
  
  
          pnl_activities = new JPanel();
          JLabel lbl_act = new JLabel("Y");
          pnl_activities.add(lbl_act);
          add(pnl_activities);
  
          setLocationRelativeTo(null);
          setVisible(true);
  
      }
  }
  </code></pre>
  
  <p>When I create this Frame I was expecting that it would create a frame with two panels. But, I only see the second panel (i.e.) I only see <code>Y</code> on the screen and not <code>X</code>. However, if I remove the code for the second panel, then I can see <code>X</code>.</p>
  
  <p>What happens when I add the second panel. Why does the first panel not show up in the frame?</p>