On Fri, 20 Jun 2025 03:09:32 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> wrote:
> Issue is RadioButtonMenuItem and CheckBoxMenuItem bullet/checkmark icon is > not displayed in WindowsL&F when the test is run with NimbusL&F. > This is because `WindowsIconFactory#VistaMenuItemCheckIcon.paintIcon` called > `getLaFIcon()` which returns a empty NimbusIcon which causes no icons to be > drawn. This is because the test after setting WIndows L&F of the menuitem > reverts back the Windows L&F to Nimbus L&F via > `UIManager.setLookAndFeel(save);` call in the test so when frame is made > visible, the L&F resets back to Nimbus L&F resulting in null NimbusIcon. > > Fix is made to make sure the whole frame is updated to cater to L&F change > via `SwingUtilities.updateComponentTreeUI(frame);` call and keep the L&F > without reverting back to original L&F.. I dont think the test is invalid..It was in closed repo and tested for so many years before it got opensourced L&F is anyway applied to entire component tree in the fix via `SwingUtilities.updateComponentTreeUI(frame);` Similar method was used in opensourced test javax/swing/JTabbedPane/bug4499556.java by @prrace ..Its the similar strategy used in many closed/open manual tests for testing different L&Fs in applet era @prrace Any comments on this test regarding its validity and fix? ------------- PR Comment: https://git.openjdk.org/jdk/pull/25907#issuecomment-3001105201