On Fri, 4 Jul 2025 10:06:51 GMT, Abhishek Kumar <abhis...@openjdk.org> wrote:

> Yes but it was not supposed to come when 
> SwingUtilities.updateComponentTreeUI(frame) is used to update all UI 
> components.

Why not?

In fact, I expected that all the menu items would switch to the latest L&F 
after updating the component tree.

But it doesn't happen… because the menu bar isn't part of the component 
hierarchy (yet). If you move the call `frame.setJMenuBar(menuBar)` before each 
L&F menu is created, all the popup menus are displayed in Windows L&F, the 
latest installed L&F.

Either way, the test doesn't work correctly.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25907#discussion_r2184983021

Reply via email to