RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v25]

Alexey Ivanov aivanov at openjdk.org
Thu Sep 1 16:36:35 UTC 2022


On Fri, 26 Aug 2022 14:30:10 GMT, Abhishek Kumar <duke at openjdk.org> wrote:

>> JFileChooser - empty file size issue fixed. 
>> For empty file, now the size 0 KB.
>> Manual Test Case "FileSizeCheck.java" created.
>
> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Updated as per suggested changes

test/jdk/javax/swing/JFileChooser/FileSizeCheck.java line 64:

> 62:     public static void test() {
> 63:         JFrame frame = new JFrame("JFileChooser File Size test");
> 64:         JFileChooser fc = new JFileChooser();

If you add,


fc.setControlButtonsAreShown(false);


the panel with _Open_ and _Cancel_ button will be hidden. I think it improves user experience, clicking either button does nothing.

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

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



More information about the client-libs-dev mailing list