Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8216329

Cannot resize CheckBoxItemMenu in Synth L&F with setHorizontalTextPosition

    Details

    • Subcomponent:
    • Introduced In Version:
    • Resolved In Build:
      b13
    • CPU:
      x86_64
    • OS:
      windows_10

      Description

      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


        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pbansal Pankaj Bansal
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: