On Tue, 20 May 2025 00:08:05 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

>> The issue is when a JSplitPane is embedded inside a lazily-initialized 
>> panel, and this panel is displayed using a dialog created via 
>> JOptionPane.createDialog(), the divider location is not preserved when 
>> reopening the dialog. 
>> 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.
>> Fixed by setting the divider location before rendering the left and right 
>> components..
>
> test/jdk/javax/swing/JSplitPane/TestSplitPaneResetDividerLoc.java line 71:
> 
>> 69:                 point = openDialogButton.getLocationOnScreen();
>> 70:             });
>> 71:             robot.mouseMove(point.x, point.y);
> 
> When I run the test on my macOS laptop, it fails because the click occured on 
> the window border instead of the button. It would be good to slightly shift 
> the click position to ensure it reliably hits the button across platforms.
> 
> btw it is better to use EventQueue.invokeAndWait instead of 
> SwingUtilities.invokeAndWait. The latter was added early on, while the former 
> consolidates all event-dispatching utilities in one class.

maybe we can loop over installed L&F?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25294#discussion_r2096631567

Reply via email to