On Wed, 8 Feb 2023 05:36:55 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
wrote:

>> Issue is observed that after changing the Look & Feel from Metal to Nimbus 
>> and back to Metal, the Nimbus font continues to be used by a JFileChooser.
>> This is because Synth  `installDefaults `methods set the font, but its 
>> inverse methods `uninstallDefaults `do not remove them.
>> Fix is made to reset the font if it is set by L&F.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   jcheck fix

Changes requested by aivanov (Reviewer).

test/jdk/javax/swing/JFileChooser/JFileChooserFontReset.java line 53:

> 51:             SwingUtilities.invokeAndWait(() -> setLookAndFeel(laf));
> 52:             JFileChooser fc = new JFileChooser();
> 53:             Font origFont = fc.getFont();

This is really inconsistent: you set L&F on EDT but you create `JFileChooser` 
on main thread. You should either do everything on main thread or, preferably, 
move all the test code onto EDT.

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

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

Reply via email to