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

[macOS] JComboBox size is small to display a selected item fully

    XMLWordPrintable

Details

    Description

      FULL PRODUCT VERSION :
      JDK 10.0.2, JDK 10.0.1

      ADDITIONAL OS VERSION INFORMATION :
      macOS 10.13.6

      A DESCRIPTION OF THE PROBLEM :
      Size of "javax.swing.JComboBox" component is insufficient to display the selected item fully, if the item's own size is big, for example if a font with point size 48 is set to "JComboBox". The issue affects similarly combo boxes whose items are "String" objects and combo boxes with "javax.swing.Icon" objects as items. However, the items in the drop-down list of the combo box component are displayed properly.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Compile and run the attached to the bug test case "ComboBoxSizeIsSmallForItem.java".
      2. Verify that sizes of both "JComboBox" components involved in the test case are sufficient to display correctly the selected items in these components.

      Additional information:
      - The original test case "ComboBoxSizeBug.java" from the bug filer can also be used to reproduce the issue, but it allows to test less test scenarios.
      - The same issue can also be reproduced using "CustomComboBoxDemo.java" example from the next Java Tutorials web page.
      https://docs.oracle.com/javase/tutorial/uiswing/components/combobox.html

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED - Vertical size of "JComboBox" should match with the size of its selected item or at least be large enough to display the item correctly.
      ACTUAL - Vertical size of "JComboBox" is always the same and only works for items of very small size.

      CUSTOMER SUBMITTED WORKAROUND :
      None

      FREQUENCY :
      Always

      Attachments

        Activity

          People

            rkannathpari Renjith Kannath Pariyangad
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: