I have a JSplitpane in my software and two JPanels inside it, and I would like the height of the divider to ajust with the screen resize
Heres what happen when I resize :
I have been looking everywhere for this and I know it must be easy to fix but I could not find it.
Required code :
splitPane.setResizeWeight(1);
Explanation :
A value of 0, the default, indicates the right/bottom component gets all the extra space (the left/top component acts fixed), where as a value of 1 specifies the left/top component gets all the extra space (the right/bottom component acts fixed). Specifically, the left/top component gets (weight * diff) extra space and the right/bottom component gets (1 - weight) * diff extra space.