title: Adding JPanels to a main Panel
body: <p>So I have created three classes, the main method class, the Frame class and the JPanel class. Inside the JPanel class i would like to add three more JPanels, one at the top of the JFrame, one in the center and one at the bottom. My Code for the classes JPanel and JFrame are as follows:
  JPanel:</p>
  
  <pre><code>public class ConcertPanel extends JPanel
  {
  public ConcertPanel() 
  {
      JPanel ConcertPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
  
      JPanel Panel1 = new JPanel();  
      Panel1.setSize(800,200);
      Panel1.setBackground(Color.BLUE);
  
      JPanel Panel2 = new JPanel(); 
      Panel2.setSize(800,400);
      Panel1.setBackground(Color.GREEN);
  
      JPanel Panel3 = new JPanel(); 
      Panel3.setSize(800,200);
      Panel1.setBackground(Color.GRAY);
  
      this.add(Panel1);
      this.add(Panel2);
      this.add(Panel3);
  }        
  }
  
  public class ConcertFrame extends JFrame 
  {
  private ConcertPanel controlPane;
  // The constructor
  public ConcertFrame()
  {
      controlPane = new ConcertPanel() ;
      this.add(controlPane);
  ....
  </code></pre>
  
  <p>When this project is ran, there are no errors showing up, but when the JFrame pops up it doesn't give me the three different colored panels within it but only a small grey box at the top. Can anyone tell me why or help?</p>