-
Bug
-
Resolution: Fixed
-
P3
-
8u152, 9, 11, 12
-
b13
-
x86_64
-
windows_10
A DESCRIPTION OF THE PROBLEM :
Using a Synth Look and Feel, JCheckBoxMenuItem cannot resize after setHorizontalTextPosition. This occurs only with jdk 1.8.0_152 or higher. With JDK 1.5.0_151 or older the problem doesn't occur.
REGRESSION : Last worked in version 8u172
---------- BEGIN SOURCE ----------
// Set synth look an feel
JFrame frame = new JFrame();
frame.setTitle("Test");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JMenuBar menuBar = new JMenuBar();
JMenu menu = new JMenu("Options");
JCheckBoxMenuItem colorKeyCheckBox = new JCheckBoxMenuItem();
colorKeyCheckBox.setSelected(false);
colorKeyCheckBox.setMnemonic(KeyEvent.VK_K);
colorKeyCheckBox.setText("Show Color Key");
colorKeyCheckBox.setHorizontalTextPosition(JCheckBoxMenuItem.LEADING);
colorKeyCheckBox.setVerticalTextPosition(JCheckBoxMenuItem.CENTER);
menu.add(colorKeyCheckBox);
menuBar.add(menu);
frame.setJMenuBar(menuBar);
frame.setPreferredSize(new Dimension(500, 500));
frame.pack();
frame.setVisible(true);
---------- END SOURCE ----------
FREQUENCY : always
Using a Synth Look and Feel, JCheckBoxMenuItem cannot resize after setHorizontalTextPosition. This occurs only with jdk 1.8.0_152 or higher. With JDK 1.5.0_151 or older the problem doesn't occur.
REGRESSION : Last worked in version 8u172
---------- BEGIN SOURCE ----------
// Set synth look an feel
JFrame frame = new JFrame();
frame.setTitle("Test");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JMenuBar menuBar = new JMenuBar();
JMenu menu = new JMenu("Options");
JCheckBoxMenuItem colorKeyCheckBox = new JCheckBoxMenuItem();
colorKeyCheckBox.setSelected(false);
colorKeyCheckBox.setMnemonic(KeyEvent.VK_K);
colorKeyCheckBox.setText("Show Color Key");
colorKeyCheckBox.setHorizontalTextPosition(JCheckBoxMenuItem.LEADING);
colorKeyCheckBox.setVerticalTextPosition(JCheckBoxMenuItem.CENTER);
menu.add(colorKeyCheckBox);
menuBar.add(menu);
frame.setJMenuBar(menuBar);
frame.setPreferredSize(new Dimension(500, 500));
frame.pack();
frame.setVisible(true);
---------- END SOURCE ----------
FREQUENCY : always
- relates to
-
JDK-8152981 Double icons with JMenuItem setHorizontalTextPosition on Win 10
- Resolved