2

I want my JFrame to have 2 JPanels; one is a Gridlayout() and the other one is a FlowLayout(). I want the GridLayout() to occupy the entire height of the JFrame and 80% of the width. FlowLayout() panel should take the rest 20% of the width of the JFrame. (The JFrame is resizable).

I add them like this to divide them into different places:

add(paneGrid, BorderLayout.WEST); //This one should occupy 80% of width
add(paneFlow, BorderLayout.NORTH); //This one should the rest (20%)

However, by doing this they divide the JFrame into 50% each. How can I modify this? Here is an example of how I want them to divide the space of the JFrame:

enter image description here

0 Answers0