[SWING] [SOLVED] halving the screen with two seperate panes?

I’m trying to understand how layouts work and I can’t wrap my head around them. What I am trying to accomplish is to have two scroll panes each take up half of the window. At the moment, they both show up but they do not take up half individually, I keep trying to set the sizes of them but it seems to not do anything at all!

These are the panes :

/* Text */
		JPanel contentPane = new JPanel();
		contentPane.setLayout(new GridLayout(1, 2));

		inboxPanel = new JPanel();
		messagePanel = new JPanel(new GridLayout(1, 2));
		inboxPanel.setLayout(new GridLayout(1, 2));
		

This is how I add them :


messagePanel.add(jMessageScrollPane);
		inboxPanel.add(jInboxScrollPane);
		contentPane.add(messagePanel);
		contentPane.add(inboxPanel)

;