RFR: 8139228: JFileChooser renders file names as HTML document [v3]

Alexey Ivanov aivanov at openjdk.org
Wed May 21 19:46:55 UTC 2025


On Wed, 21 May 2025 15:56:49 GMT, Tejesh R <tr at openjdk.org> wrote:

> Why would we need HTML-formatted instructions btw ?

Because the instructions are really hard to read in Windows L&F (because of the monospace font):

![HTMLFileName Instructions in Windows L&F: the text doesn't fit nicely in the window and gets wrapped](https://github.com/user-attachments/assets/ecd39482-e448-4436-96e5-8d6b96c888d9)

The image isn't clear, but you get the idea: all the text gets wrapped, so it's hard to keep track of the instructions. Anyway, I'm fine with it.

Harshitha had [a similar problem](https://github.com/openjdk/jdk/pull/24456#discussion_r2054468745), and she switched to [using HTML formatting](https://github.com/openjdk/jdk/pull/24456#discussion_r2054516242) which works reliably across different OS.

You can check [`JFileChooser/bug4943900.java`](https://github.com/openjdk/jdk/blob/master/test/jdk/javax/swing/JFileChooser/bug4943900.java) on how it looks and works in different OS.

https://github.com/openjdk/jdk/blob/81536830ed096005c4f09ab446238ce50989cea9/test/jdk/javax/swing/JFileChooser/bug4943900.java#L40-L47

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24439#discussion_r2101040424


More information about the client-libs-dev mailing list