I have a JFrame
with layout BorderLayout
, I add JPanel
s using BorderLayout.CENTER
I have a JPanel
(added using CENTER), that uses GridLayout
to place 4 buttons.
These buttons are MASSIVE, taking up the whole screen. Or, I do it my way as follows:
- I have a JFrame with layout null, I set JPanel bounds and add them.
- I have a JPanel: It sets it's own bounds so it takes up center 1/2 of screen, and is only 1/8 of the screen tall.
- It adds buttons using grid layout, and results in a nice line of buttons.
Obviously the second option looks better, but as I wish to conform to the norm, and always use layouts... How to I mix customization and layouts?(Or just solve my problem at all)