title: Java Swing JPanel size not working
body: <pre><code>    frame = new JFrame();
      frame.setTitle("Chess Legends");
      frame.setBounds(100, 100, 810, 830);
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  
      //game panel
      panelGame = new JPanel();
      panelGame.setBackground(new Color(0, 0, 0));
      frame.getContentPane().add(panelGame, BorderLayout.CENTER);
      panelGame.setLayout(null);
  
      //board panel
      panelBoard = new JPanel();
      panelBoard.setBackground(new Color(255, 255, 255));
      panelBoard.setBounds(5, 5, 800, 800);
      panelGame.add(panelBoard);
  </code></pre>
  
  <p>This is my code. I want the panelGame to fill the entire frame. Then I want the panelBoard to take upp 800x800 size inside the panelGame. But my panelBoard seems to be too big.</p>
  
  <p>The frame is already larger than the bounds of the panelBoard,Yet when the GUI launches.. my panelBoard extends outside the frame. Why? </p>