On Wed, 21 May 2025 02:30:50 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

> > This is because when we added support for ComponentOrientation for 
> > JSplitPane, even though the left and right compoent is drawn the divider 
> > location is not set and was set to initial value and not to the value set 
> > by user.
> 
> It seems a bit inconsistent: on one hand the bug description says that the 
> initial value is used and the value set by the user is ignored but on the 
> other hand, the fix just resets the same value to itself. Could you clarify 
> how this change addresses the issue: `+ 
> this.setDividerLocation(this.getDividerLocation());`
> 
> I have found that for some reason an incorrect value is being set from 
> `BasicSplitPaneUI$BasicHorizontalLayoutManager.layoutContainer`. Could it be 
> that this class incorrectly initializes the dividerLocation to the initial 
> value instead of using the one set by the user?

Since it is regression of 4265389: JSplitPane does not support 
ComponentOrientation where setComponentOrientation method is added, it made 
sense to me to set the divider location in that method explicitly as it was 
working before that fix..
If `BasicSplitPaneUI$BasicHorizontalLayoutManager.layoutContainer` had a 
problem it would have affected before the fix also as that method was not 
changed in 4265389 fix..

-------------

PR Comment: https://git.openjdk.org/jdk/pull/25294#issuecomment-2896478225

Reply via email to