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

JComboBox width is too narrow on Windows XP L& F

XMLWordPrintable

    • b96
    • x86
    • windows_xp

      FULL PRODUCT VERSION :
      java version "1.6.0-rc"
      Java(TM) SE Runtime Environment (build 1.6.0-rc-b88)
      Java HotSpot(TM) Client VM (build 1.6.0-rc-b88, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
        Bug # 4966585 exists in Mustang. Text is cut off and replaced with "..." on JComboBoxes with the Win XP LnF.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the supplied test case

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Text should not be truncated and replaceed with "..."
      ACTUAL -
      Text is truncated and replaced with "..."

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.awt.BorderLayout;

      import javax.swing.JComboBox;
      import javax.swing.JFrame;
      import javax.swing.JLabel;
      import javax.swing.JPanel;
      import javax.swing.UIManager;
      import javax.swing.UnsupportedLookAndFeelException;

      /*
       * Created on 16-Jun-2006
       *
       */

      public class ComboTest
      {
      public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException
      {
      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
      JFrame f = new JFrame("Windows XP LnF - ComboBox Width Test");
      JComboBox cb = new JComboBox(new String [] {"Video + Audio", "Video only", "Audio only"});
      JPanel p = new JPanel();
      p.add(cb);
      f.getContentPane().add(p, BorderLayout.NORTH);
      f.getContentPane().add(new JLabel("The above combox is sized too narrow on Java 6 and cuts off the text of the first item. Java 5 does not have the problem."), BorderLayout.SOUTH);
      f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      f.pack();
      f.setVisible(true);
      }

      }

      ---------- END SOURCE ----------

      Release Regression From : 5.0
      The above release value was the last known release where this
      bug was not reproducible. Since then there has been a regression.

      Release Regression From : 5.0
      The above release value was the last known release where this
      bug was not reproducible. Since then there has been a regression.

            jmarinacsunw Joshua Marinacci (Inactive)
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: