I am writing a program, which has a toolbar panel at the bottom (using BorderLayout) of the content pane, and a main panel at the center of the content pane.
The main panel has a label at the bottom (using BorderLayout) and a "view" panel in the center which has a cardLayout. The view panel has two components at the moment, a label and a text area.
The problem is that except for the toolbar panel, all other panels do not occupy all the space available (see diagrams attached).
I know this problem is solved by using a different layout manager, but the problem is i'm not sure which one would be the best to use here. I could use some advice.

I've attached three things
-a simplified compilable version of the code, to illustrate the problem
-a screenshot of what I get when I run the code
-an image of the kind of layout I want.

Thanks for your help.

Java Code:
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextArea;

public class LayoutProblem {
	private JFrame window;
	private JButton button;
	private JLabel label;
	private JPanel contentPanel;
	private JPanel middlePanel;
	private JPanel bottomPanel;
	private JLabel textAreaLabel;
	private JTextArea textArea;
	public LayoutProblem()
		window = new JFrame("Window");
		bottomPanel = new JPanel();
		button = new JButton("Button");
		window.getContentPane().add(bottomPanel, BorderLayout.SOUTH);
		contentPanel = new JPanel();
			label = new JLabel ("Label");
			middlePanel = new JPanel();
				middlePanel.setLayout(new FlowLayout(FlowLayout.CENTER));
				textAreaLabel = new JLabel("Hi");
				textArea = new JTextArea("Stuff Stuff Stuff");
	public static void main(String args[])
		new LayoutProblem();
What I get:
How to get panels to occupy all available space and components in the center?-image_1.png

What I want: (Sorry, the image kinda burns the eyes a bit)
How to get panels to occupy all available space and components in the center?-image_2.png