On Fri, 27 Jun 2025 03:44:23 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> wrote:
>> src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuItemUI.java >> line 234: >> >>> 232: } >>> 233: return iconPresent; >>> 234: } >> >> This should be really simple: >> >> >> private static boolean checkIfImageIconPresent(JMenuItem mi) { >> return (mi instanceof JCheckBoxMenuItem >> || mi instanceof JRadioButtonMenuItem) >> && mi.getIcon() != null; >> } >> >> >> That is > > Have you checked this code? It doesn't work for me > > I get this whereby JRadioButtonMenuItem3 which doesnt have imageicon is not > aligned..For this only, we need to know if other RBMIs have imageicon from > ButtonGroup or if there any other way, let me know.. > >  No, I didn't. It doesn't work because the overall menu layout isn't right at the moment. If you implement [four-column layout](https://github.com/openjdk/jdk/pull/23324#issuecomment-3008593168): check mark / bullet, icon, text, accelerator, it would work. Just like the text of **MenuItem1** and **JCheckBoxMenuItem 3** would be aligned to the text of other menu items. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23324#discussion_r2171742764