RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB
Alexey Ivanov
aivanov at openjdk.org
Thu Jun 30 17:42:40 UTC 2022
On Thu, 30 Jun 2022 16:36:41 GMT, Naoto Sato <naoto at openjdk.org> wrote:
>> Would java.text.CompactNumberFormat work for java 8?
>
> It is introduced in JDK12. If this has to be backported to 8, that's not an option.
I think we should follow the current format for the time being and show the file size similar to how its shown in native tools.
In Windows Explorer, 0 bytes are shown as 0 KB, 1 byte is 1 KB and so on… However, JFileChooser shows these as 0 bytes and 1 bytes in both Java/Metal and Windows L&Fs.
On macOS, Finder shows the size as "Zero bytes" and "1 byte" correspondingly. JFileChooser in Aqua L&F doesn't show the size.
-------------
PR: https://git.openjdk.org/jdk/pull/9327
More information about the client-libs-dev
mailing list