On Wed, 12 Mar 2025 11:00:30 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> wrote:
>> When JRadioButtonMenuItem is called with imageIcon, then only imageIcon is >> shown without radiobutton in WIndowsLookAndFeel as there was no provision of >> drawing the radiobutton alongside icon. >> If icon is not there, the radiobutton is drawn. Added provision of drawing >> the radiobutton windows Skin even when imageIcon is present. > > Prasanta Sadhukhan has updated the pull request incrementally with one > additional commit since the last revision: > > Review comments fix I checked rbma.cpp output where I think we can only support the 4th item in the list (which is this)  This is because we have [JRadioButtonMenuItem](https://docs.oracle.com/en/java/javase/24/docs/api/java.desktop/javax/swing/JRadioButtonMenuItem.html#%3Cinit%3E(java.lang.String,javax.swing.Icon,boolean))([String](https://docs.oracle.com/en/java/javase/24/docs/api/java.base/java/lang/String.html) text, [Icon](https://docs.oracle.com/en/java/javase/24/docs/api/java.desktop/javax/swing/Icon.html) icon, boolean selected) API which only supports one icon image (so checked/unchecked icon image **in addition** to item icon as below image is not possible in my opinion in Java swing)  The current state of PR supports this 4th item. Only thing different is when there is no imageicon and menuitem is selected, then the text seems to be in same vertical line as the other items (in native rbma output)  but current PR the text is shifted to left (when there is no imageicon ie 3rd item in list) and occupies icon space, as below  This is because in most cases (and in SwingSet2) the radiomenu items are drawn without imageicon and there is no extra space between radio bullet and menu text  so if we cater to text shifting to same vertical line, there will be difference in behavior w.r.t existing one and user will notice a shift in text to accomodate non-existing image icon) but it is fixable, so if we are in consensus about supporting the 4th item in rbma.cpp output in Java swing with text in same vertical offset, then let mw know..Anything else in addition needs discussion whether we can support... ------------- PR Comment: https://git.openjdk.org/jdk/pull/23324#issuecomment-2909069636