JDK-4147656 : JSplitPane needs a proportional mode for divider positioning
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.1.6,1.2.0
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic,windows_95,windows_nt
  • CPU: generic,x86
  • Submitted: 1998-06-11
  • Updated: 1999-03-23
  • Resolved: 1999-03-23
Related Reports
Relates :  
Description
ralph.kar@Eng 1998-06-10
When a JSplitPane is being resized the divider always stays at its absolute position or moves to the edge of the JSplitPane when it can't maintain its absolute position after resizing.
JSplitPane.setDividerLocation(double) allows for relative positioning, but this positioning goes away after the JSplitPane has been resized. A relative divider positioning mode would come handy here.
Unfortunately this requires some additional public APIs.

Comments
EVALUATION ralph.kar@Eng 1998-06-10 Yes, that would be a cool thing to have. Unfortunately we can't make any commitments to this new feature at this point, because it would require additional public APIs. scott.violet 1999-03-23 While there still isn't explicit support for relative positioning you can use setResizeWeight(.5) to get behavior pretty close to what you want. Refer to bug 4149278 for more info on set/getResizeWeight which is new to 1.3.
11-06-2004

PUBLIC COMMENTS A proportional mode for the divider location of a JSplitPane would maintain relative positioning of the divider. scott.violet 1999-03-23 While there still isn't explicit support for relative positioning you can use setResizeWeight(.5) to get behavior pretty close to what you want. Refer to bug 4149278 for more info on set/getResizeWeight which is new to 1.3.
10-06-2004

WORK AROUND ralph.kar@Eng 1998-06-10 As a workaround one could attach a ComponentListener to the JSplitPane and look for resize events and then calculate the new position of the divider and set it manually.
10-06-1998