title: JPanel taking whole JFrame size. BorderLayout
body: <p>I have problem with my <code>JPanel</code>, which alone takes the whole <code>JFrame</code> space.
  I want to add two <code>JPanel</code>'s in a single <code>JFrame</code>. I'm helping myself with eclipse plugin WindowMaker, but I also tried to code the layout by hand - to no avail. There's no way that I can resize my <code>JPanel</code> e.g. make it 50% of its size.
  I read about this case and tried to understand LayoutManagers. But even if I put my <code>JLabel</code> to corner or any specific side, nothing changes so far.
  Can somebody help me with that?</p>
  
  <p>Code sample:
  private JPanel contentPane;</p>
  
  <pre><code>/**
   * Create the frame.
   */
  public GUI() {
  
      setTitle("GALAXY INVADERS: CASTELO EDITION");
      setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  
      setBounds(200, 100, 1000, 600);
  
  
      getContentPane().setLayout(new BorderLayout());
  
      // init of the Panel
      contentPane = new MyPanel2();
  
      contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
      contentPane.setLayout(new BorderLayout(300, 400));
      setContentPane(contentPane);
  
  }
  </code></pre>
  
  <p><code>MyPanel2</code> is a class which extends JPanel.</p>