Please help me out in this, i wanna set the layout of a panel such that, that 60% of its width is covered by one another sub-panel and 40% by another sub-panel, i tried using BorderLayout and tried setting first sub-panel at CENTER and second sub-panel at LINE_END, but the first panel is taking too much space. something like: as shown in pic.
I wanna use a GridBagLayout here, but not getting a way to provide 60-40 ratio to these sub-panels.
Note: Can't use any other layout here, since my application window is re-sizable, hence after re-sizing, both the panels should re-size along with their parent panel in exactly the same ratio.
looking forward for some reply with explanation.
-------------------------------<br />you can't move ahead, unless you try for it.
Can't you set the width of the left sub panel to 60% of the main panel and 40% on the right one. Then you put a listener on the split pane and adjust the width of these if you change the size of the split pane?