title: How to implement North and South sections in same JPanel
body: <p>Is it possible to have a north and south component in the same <code>JPanel</code>? For example, I want text to display with a 2 x 2 grid layout below. How could I change this code to make that happen? I'm new to Java Swing and am not sure where I should look.</p>
  
  <pre><code>public  CompView(){
  super("Super");
  setResizable(false);
  setLocationRelativeTo(null);
  
  JPanel northPanel = new JPanel();
  JPanel middlePanel = new JPanel();
  JPanel southPanel = new JPanel();
  
  getContentPane().add(northPanel, BorderLayout.NORTH);
  northPanel.add(new JLabel("TITLE", CENTER));
  northPanel.setLayout(new GridLayout(2,2));
  northPanel.add(new JLabel("Text: "));
  northPanel.add(new JTextField());
  northPanel.add(new JLabel("Text: "));
  northPanel.add(new JTextField());
  
  getContentPane().add(middlePanel, BorderLayout.CENTER);
  middlePanel.setLayout(new GridLayout(2,1));
  middlePanel.add(new JLabel("Title 2:", CENTER));
  middlePanel.add(new JTextField());
  }
  </code></pre>
  
  <p>Current Image</p>
  
  <p><a href="https://i.stack.imgur.com/3asrP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3asrP.png" alt="enter image description here"></a></p>
  
  <p>I would like the output to look like this:</p>
  
  <pre><code>| Super             |_|  |X|
  ----------------------------     --|
  |          Title           |       |
  ----------------------------       |
  | Text: | JTextField 1   | |       } North Panel
  ----------------------------       |
  | Text: | JTextField 2   | |       |
  ----------------------------     --|
  |         Title 2          |       |
  ----------------------------       } Center Panel
  | | Resizable JTextField | |       |
  ----------------------------     --|
  </code></pre>
  
  <p>Hope this diagram helps.</p>