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

[Windows] JComboBox change in ui when editor.setBorder() is called

    XMLWordPrintable

    Details

    • Subcomponent:
    • Introduced In Version:
      9
    • Resolved In Build:
      b17
    • CPU:
      x86_64
    • OS:
      windows

      Backports

        Description

        A DESCRIPTION OF THE PROBLEM :
        The border which is supposed to paint around a combo box is not painted instead text field is covering the combobox border.


        REGRESSION : Last worked in version 10.0.1


        ---------- BEGIN SOURCE ----------
        import javax.swing.*;
        import javax.swing.plaf.basic.BasicComboBoxEditor;

        public class ComboUI {
            public static void main(String[] args) throws ClassNotFoundException, UnsupportedLookAndFeelException, InstantiationException, IllegalAccessException {
                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                JFrame frame = new JFrame();
                JPanel panel = new JPanel();
                JComboBox comboBox = new JComboBox(new Object[] {"apple", "ball"});
                comboBox.setEditable(true);
                //Reproducible as BasicComboBoxEditor call's setBorder(null)
                comboBox.setEditor(new BasicComboBoxEditor());
                panel.add(comboBox);
                frame.add(panel);
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                frame.pack();
                frame.setVisible(true);
            }
        }
        ---------- END SOURCE ----------

        FREQUENCY : always


          Attachments

          1. 10.0.1.PNG
            10.0.1.PNG
            3 kB
          2. 8u172.PNG
            8u172.PNG
            3 kB
          3. ComboUI.java
            0.8 kB
          4. JDK_11_Windows7.JPG
            JDK_11_Windows7.JPG
            10 kB

            Issue Links

              Activity

                People

                Assignee:
                psadhukhan Prasanta Sadhukhan
                Reporter:
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: