0

I want to put 2 JPanels next to each other in 1 JFrame. My JFrame is 1200 in width.

But I want the left panel to have the size of 300 and my right panel be the size of 900.

Michael
  • 41,989
  • 11
  • 82
  • 128
Rami
  • 23
  • 6
  • You should be able to set the preferred sizes of the `JPanel` accordingly, then put them both in a `BoxLayout`. If you can't get taht to work, then please show us a [mcve] of what you're tried so far. – Michael Berry May 10 '18 at 11:20

1 Answers1

0

Set JFrame with BorderLayout and then set the first JPanel orientation West and the other set to Center. The first JPanel set 300 width. The other panel will be with the adjusted to the Frame

William
  • 467
  • 1
  • 6
  • 19