On Fri, 19 Jul 2024 08:05:06 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

>> JSplitPane's support of CompoentOrientation is not present so if orientation 
>> is RTL, it still renders left component on left and right component on right 
>> instead of other way around..
>> Fix to make it support RTL orientation
>
> Prasanta Sadhukhan has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   whitespace removal

After swapping the right/left component on componentOrientation, if user 
reset/remove+add another to either left/right won't it cause confusion?
For example in this piece of code the frame ends up containing component one to 
right and another to left though I'm adding both the component to right. 

JSplitPane jsp = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
       null, new JButton("Right_First"));
jsp.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
jsp.setRightComponent(new JButton("Right_Second"));
JFrame frame = new JFrame();
frame.add(jsp);
frame.pack();
frame.setVisible(true);

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

PR Review: https://git.openjdk.org/jdk/pull/20214#pullrequestreview-2187635421

Reply via email to