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

jdk 1.0.2 , Choice widget does not display well if no item to select

XMLWordPrintable

    • generic
    • solaris_2.5.1

      The Choice component does not display correctly on startup if no item was added using the addItem method ie. there are no items to select. The component will display a flat line not resembling a proper GUI control.

      Here is a test case:

      import java.awt.*;


      public class ChoiceNone extends Frame
      {
        public ChoiceNone()
        {
          setTitle("Choice Box Test");

          Choice c = new Choice();

          // do not add any items to select
          // c.addItem("Item");

          add("Center", c);
          resize(200,300);
          show();
        }

        public static void main (String[] args )
        {
          new ChoiceNone();
        }

      }


      Name: rrT76497 Date: 05/05/98

      ecjohn May 06,98. Already available in db
      ----------------------------------------------------------------------------
      ------
      SIP Technologies & Exports Ltd. | SIPtech ...
      G4, Elnet Software City, CPT Road |
      Taramani, Madras 600 113, India. | Delivering Values
      Phone : +91-44-235 4473, +91-44-235 4474 |
      Fax : +91-44-235 4475 |
      Email : ###@###.### |
      ----------------------------------------------------------------------------
      ------


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

            rramsunw Ranganathan Ram (Inactive)
            gvanassesunw Gunter Vanasse (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: