title: Java BorderLayout issues placing panels
body: <p>I am new to Java GUI stuff and currently working on creating a microwave GUI. I am trying to place a panel within a panel but it's not really working as I think it should. I am using BorderLayout and basically putting a panel into BorderLayout.WEST and putting 2 panels within it (NORTH and CENTER). But somehow I can't add a panel to its CENTER, it seems like its going to NORTH all the time. Please see my code below.</p>
  
  <pre><code>private void buildFrame() 
  {
          ovenLabel=new JLabel("Oven Area - Food goes here");
          add(ovenLabel, BorderLayout.CENTER);
          ovenLabel.setBackground(Color.white);
          ovenLabel.setOpaque(true);
          ovenLabel.setHorizontalAlignment(JLabel.LEFT);
          ovenLabel.setVerticalAlignment(JLabel.TOP);
          ovenLabel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 5));
  
      //sidePanel
      side=new JPanel();
      add(side, BorderLayout.EAST);
      side.setBorder(BorderFactory.createLineBorder(Color.BLACK, 5)); //remove this later
      //top panel
      sideTop=new JPanel();
      sideTop.setBackground(Color.white);
      sideTop.setOpaque(true);
      sideTop.setLayout(new GridLayout(3, 1));
      side.add(sideTop, BorderLayout.NORTH);
      displayLabel=new JLabel[3];
      for(int i=0;i&lt;displayLabel.length; i++)
      {
          displayLabel[i]=new JLabel("");
          sideTop.add(displayLabel[i]);
      }
      displayLabel[0].setText("Cooking time is displayed here. . .");
      //bottom panel
      sideBot=new JPanel();
      sideBot.setLayout(new GridLayout(5, 3));
      side.add(sideBot, BorderLayout.CENTER);
      buttons=new JButton[15];
      for(int i=0;i&lt;buttons.length;i++)
      {
          buttons[i]=new JButton("test");
          sideBot.add(buttons[i]);
      }
      //button
  
  
  
  
  }
  </code></pre>