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

Choice popup menu has incorrect width sometimes

    XMLWordPrintable

Details

    • tiger
    • generic
    • generic
    • Verified

    Description



      Name: iaR10016 Date: 06/19/2003


      Filed By : J2SE-SQA [###@###.###
      JDK : JDK1.5.0-b04, JDK1.4.2-b20, JDK1.4.1, JDK1.4.0
      Platform[s] : all

      Choice comonent popup menu has incorrect width sometimes.
      For example, in the following test popup menu is too wide:
      it is expected that popup menu will have the same width as the Choice component
      or will correspond to the item strings length.

      Please, see also bug 4851798.

      --------- test.java ---------
      import java.awt.*;

      public class test extends JFrame {

        public test() {
          super("Choice test");
          final Choice aChoice = new Choice();
          for (int i=0; i<10; i++) aChoice.add((new Integer(i)).toString());
          getContentPane().add(aChoice,BorderLayout.CENTER);
        }

        public static void main(String[] args) {
          JFrame frame = new test();
          frame.setSize(new Dimension(150,60));
          frame.setVisible(true);
         }
      }
      -----------------------------

      ======================================================================

      Attachments

        Issue Links

          Activity

            People

              bchristi Brent Christian
              irasunw Ira Ira (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: