title: Adding vertical spacing to NORTH component in BorderLayout
body: <p>I have a JFrame with a <code>BorderLayout</code>. I added a <code>JPanel</code> to the NORTH side of the <code>JFrame</code>. In this panel I want to add components to it in an absolute positioning. In the Center side of the JFrame I added another <code>JPanel</code> which should take a huge space. However when I run the application I see nothing from the North <code>JPanel</code> as the Center <code>JPanel</code> occupied all the space of the <code>JFrame</code>! How can I give vertical space to the North JPanel?</p>
  
  <p>I really need to used absolute positioning for the north JPanel.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>public class AAAA extends JFrame {
  
      private JPanel contentPane;
  
      /**
       * Launch the application.
       */
      public static void main(String[] args) {
          EventQueue.invokeLater(new Runnable() {
              public void run() {
                  try {
                      AAAA frame = new AAAA();
                      frame.setVisible(true);
                  } catch (Exception e) {
                      e.printStackTrace();
                  }
              }
          });
      }
  
      /**
       * Create the frame.
       */
      public AAAA() {
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          setBounds(100, 100, 1136, 520);
          contentPane = new JPanel();
          contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
          contentPane.setLayout(new BorderLayout(0, 0));
          setContentPane(contentPane);
  
          JPanel panel = new JPanel();
          contentPane.add(panel, BorderLayout.NORTH);
          panel.setLayout(null);
  
          JButton btnNewButton = new JButton("New button");
          btnNewButton.setBounds(0, 0, 117, 29);
          panel.add(btnNewButton);
  
          JPanel panel_1 = new JPanel();
          contentPane.add(panel_1, BorderLayout.CENTER);
      }
  
  }
  </code></pre>