The code have two problems:
1.
You should not add the "upperPanel" to contentPane, and then add
it to JSplitPane, the
Java GUI container only permit add component
to one container.
2.You should use setPreferredSize intead of setMinimumSize for the
"upperPanel".
change you code to:
upperPanel.setPreferredSize(new Dimension(300, 150));
and remove the code:
contentPane.add(upperPanel, BorderLayout.NORTH);