if you want the divider moveable, you
could use a JSplitPane.
if fixed divider, use a JPanel set as BorderLayout,
board goes in CENTER, controlPanel goes to
EAST WEST NORTH or SOUTH, depending
on where you want it.
I am kind of confused. I do not know if i am doing it correctly.
I am creating a breakout game where I have to divide the frame into two, the game board and the control panel.
The control panel will display the score, restart button, and etc. This is my code.
you don't need the indicated lines - in fact they're dangerous
because they are added to (the default position) CENTER, then
removed to add at a specific location EAST/WEST
you need to work out what you want to do with the height of everything
you have 250 for one panel, 550 for another, then set the frame to 800,
this works for the width, but if you want those specific height dimensions
you'll need to use holding panels to take up the extra space.