On Thu, 3 Nov 2022 12:02:41 GMT, Abhishek Kumar <[email protected]> wrote:

>> While using a JFileChooser with the file selection mode 
>> FILES_AND_DIRECTORIES and multiSelection enabled, it is impossible to select 
>> a single directory in GTK LAF.
>> 
>> The condition check has been modified when multiselection is enabled and 
>> user has selected single directory.
>> After the fix the behavior of JFileChooser is similar to other LAFs.
>> 
>> An automatic test case 
>> `test/jdk/com/sun/java/swing/plaf/gtk/TestFileChooserSingleDirectorySelection.java`
>>  is implemented and checked in CI pipeline. Link is attached in JBS.
>
> Abhishek Kumar has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Subtest added for file selection mode

test/jdk/com/sun/java/swing/plaf/gtk/TestFileChooserSingleDirectorySelection.java
 line 113:

> 111:             clickMouse(frameLocation, 0, frameHeight, 230);
> 112:             clickMouse(btnLocation, btnWidth, btnHeight, 0);
> 113:             checkResult(laf);

I guess you can optimise by a helper method for this repeated code passing the 
offset value as paramter.

Also, did you check [JDK-4912623](https://bugs.openjdk.org/browse/JDK-4912623) 
as mentioned?

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

PR: https://git.openjdk.org/jdk/pull/10866

Reply via email to