RFR: 8354552: Open source a few Swing tests

Prasanta Sadhukhan psadhukhan at openjdk.org
Wed Apr 16 05:47:47 UTC 2025


On Wed, 16 Apr 2025 00:00:59 GMT, Damon Nguyen <dnguyen at openjdk.org> wrote:

>> Open source a few Swing regression tests.
>
> 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

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24668#discussion_r2046117640


More information about the client-libs-dev mailing list