On Wed, 16 Apr 2025 05:45:08 GMT, Prasanta Sadhukhan <[email protected]>
wrote:
>> test/jdk/javax/swing/JLabel/bug4945795.java line 61:
>>
>>> 59: JFrame mainFrame = new JFrame("Bug4945795");
>>> 60: try {
>>> 61:
>>> UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
>>
>> Not sure if it makes much of a difference or is any better, but I was
>> previously instructed to set
>> `UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");`
>> explicitly instead. Test runs fine anyway.
>
> I left a comment
>
>>
>> We can set
>> UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
>> in main and throw exception if cannot be set so that it can be done before
>> initializing PFJ
(1) Personally I've thought about complaining about all the tests that hardwire
the internal class name of a a platform L&F so
setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); is what
seems more wrong to me.
(2) "I left a comment"
yes I know, but I don't think it is necessary or better.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24668#discussion_r2047728249