On Tue, 9 Aug 2022 19:21:03 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

>> @prsadhuk I have made few changes in formatting the file size, using 
>> MessageFormat and NumberFormat to format the file size with 1 decimal place 
>> precision. Earlier JFileChooser  show file size for "1.0" as "1", now it 
>> will show one decimal place precision. Empty files show as "0 KB".
>> 
>> ![1_Decimal_Precision](https://user-images.githubusercontent.com/107542245/183662527-61c4ba88-5955-4958-9aa9-d45eb61eb710.png)
>
>> @prsadhuk I have made few changes in formatting the file size, using 
>> MessageFormat and NumberFormat to format the file size with 1 decimal place 
>> precision. Earlier JFileChooser show file size for "1.0" as "1", now it will 
>> show one decimal place precision. Empty files show as "0 KB".
> 
> If JFileChooser always shows a decimal point for nearly all files, should it 
> show 0.0 KB for zero-sized files?
> 
> I guess it would simplify your code as there'll be no reason to change number 
> format.

@aivanov-jdk I have updated as per the suggested changes.

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

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

Reply via email to