MigLayout - How to set bounds to JFrame
Yesterday i discovered MigLayout and have been experimenting whit it and so far its the best
LayoutManager and easiest to understand that i came across, any who .
So i have a problem i cant solve i want my GUI app to be split between 3 JPanels (left, center, right).
I want left panel and right panel to be of fixed size and center to be fluid. Meaning side panels expand only
vertically as JFrame is expanded and center panel expands bot horizontally and vertically.
I have set minimal size for all panels to be height of 600 but they just stay in the minimal size
and dont expand as JForm increases i dont know how to set bounds
to JFrame borders so they expand whit it.
I have tried setting bounds like so but does not work all JPanels just stay fixed i colored them to see if they expand
content.add(center, "grow"); //the same as growx, growy
Here is my code:
public class UI_View extends JFrame
private JList browse = new JList();
private JScrollPane rightX = new JScrollPane();
private JButton btn1 = new JButton("Button 1");
private JButton btn2 = new JButton("Button 2");
private JButton btn3 = new JButton("Button 3");
private JButton btn4 = new JButton("Button 4");
this.setTitle("Prototype MVC Arhitecture");
this.setMinimumSize(new Dimension(800, 600));
JPanel content = new JPanel(new MigLayout());
JPanel right = new JPanel(new MigLayout());
JPanel center = new JPanel(new MigLayout());
JPanel left = new JPanel(new MigLayout());
right.setMinimumSize(new Dimension(200, 600));
right.setMaximumSize(new Dimension(200, 37500));
center.setMinimumSize(new Dimension(400, 600));
left.setMinimumSize(new Dimension(200, 600));
left.setMaximumSize(new Dimension(200, 37500));
public static void main(String args)