RFR: 7093691: Nimbus LAF: disabled JComboBox using renderer has bad font color [v6]

Damon Nguyen dnguyen at openjdk.org
Thu Mar 2 22:43:05 UTC 2023


On Wed, 1 Mar 2023 21:45:57 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

>> Damon Nguyen has updated the pull request incrementally with four additional commits since the last revision:
>> 
>>  - Remove extra bufferedImage
>>  - Fix crlf
>>  - Add automated test. Cycle thru all LAF
>>  - Add testing for other LAFs
>
> test/jdk/javax/swing/JComboBox/DisabledComboBoxFontTestAuto.java line 100:
> 
>> 98:         ImageIO.write(disabledImage2, "png", new File(testDir
>> 99:                 + "/" + lafName + "DisabledDLCR.png"));
>> 100:         System.out.println("DIR: " + testDir);
> 
> Is this needed? I know it is just a test but please remove the debug output when not needed.

Removed the message. I added it to double check the saved images' file path, but didn't remove it before uploading.

> test/jdk/javax/swing/JComboBox/DisabledComboBoxFontTestAuto.java line 173:
> 
>> 171:             SwingUtilities.invokeAndWait(DisabledComboBoxFontTestAuto::createCombo);
>> 172:             SwingUtilities.invokeAndWait(DisabledComboBoxFontTestAuto::paintCombo);
>> 173:             testMethod();
> 
> So test will fail whenever it encounters the first wrong color? Ideally we would run test for all the installed LAFs anyways and report which ones are failed. But in this case you would need to pass the LAF name to the test method so it saves screenshots for all the LAFs for future analysis.

I added a StringBuffer which now outputs the failed LAFs to the thrown runtime exception.

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

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



More information about the client-libs-dev mailing list