-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P3
-
Affects Version/s: 25
-
Component/s: client-libs
-
b08
-
windows
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
|---|---|---|---|---|---|---|
| JDK-8377820 | 26.0.2 | Anupam Dev | P3 | Resolved | Fixed | master |
| JDK-8378252 | 25.0.4-oracle | Anupam Dev | P3 | Resolved | Fixed | master |
Windows system LAF on Windows 11.
A DESCRIPTION OF THE PROBLEM :
With Windows LAF the chevron-icon used for a parent JMenu to indicate sub-items is overdrawn when using a long text for the JMenu-label. In previous versions there would still be a small gap between the text and the chevron-icon.
this is possibly related to
REGRESSION : Last worked in version 21.0.7
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Please compile and run the attached demo to reproduce the issue. The problematic component is a JMenu with text "Really long Menu-Text" in a Popupmenu accessible by right-clicking the version-label in the demo.
---------- BEGIN SOURCE ----------
import java.awt.BorderLayout;
import java.lang.management.ManagementFactory;
import javax.swing.*;
class LargeMenuTextDemo {
public static void main(String[] args) throws Throwable {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
JFrame frame = new JFrame("LargeMenuTextDemo");
frame.setSize(300, 150);
frame.setLocationRelativeTo(null);
frame.setLayout(new BorderLayout());
frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
JPopupMenu popupMenu = new JPopupMenu();
popupMenu.add(new JCheckBoxMenuItem("CheckBox On", true));
popupMenu.add(new JCheckBoxMenuItem("CheckBox Icon On", UIManager.getIcon("FileView.floppyDriveIcon"), true));
popupMenu.add(new JCheckBoxMenuItem("CheckBox Icon Off", UIManager.getIcon("FileView.floppyDriveIcon"), false));
JMenu menu = new JMenu("Really long Menu-Text");
menu.add(new JMenuItem("Sub-MenuItem"));
menu.add(new JCheckBoxMenuItem("Sub-CheckBox On", true));
popupMenu.add(menu);
JLabel lbl = new JLabel(ManagementFactory.getRuntimeMXBean().getVmVersion());
lbl.setComponentPopupMenu(popupMenu);
frame.add(lbl, BorderLayout.CENTER);
frame.setVisible(true);
}
}
---------- END SOURCE ----------
FREQUENCY :
ALWAYS
- backported by
-
JDK-8377820 Incorrect positioning of arrow icon in parent JMenu in Windows L&F
-
- Resolved
-
-
JDK-8378252 Incorrect positioning of arrow icon in parent JMenu in Windows L&F
-
- Resolved
-
- caused by
-
JDK-8348760 RadioButton is not shown if JRadioButtonMenuItem is rendered with ImageIcon in WindowsLookAndFeel
-
- Closed
-
- relates to
-
JDK-8376828 Improve JMenuItem layout in Windows L&F
-
- Open
-
- links to
-
Commit(master)
openjdk/jdk26u/a240c8e2
-
Commit(master)
openjdk/jdk/9a10ccee
-
Review(master)
openjdk/jdk25u-dev/311
-
Review(master)
openjdk/jdk26u/38
-
Review(master)
openjdk/jdk/29375