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

Windows: Choice does not occupy the available space in a card layout

XMLWordPrintable

    • x86
    • windows_xp

      Choice does not occupy the whole available area in a card layout. This is reproducible from 1.4.2 onwards, only on Windows.

      To reproduce:
      1. Run the following code. If the choice does not occupy all the available space of the card layout, bug is reproduced.

      import java.awt.*;

      public class CardLayoutTest {

          public static void main(String[] args) {
              Frame f = new Frame();
              f.setLayout(new CardLayout());
              Choice ch = new Choice();
              ch.addItem("Item1");
              ch.addItem("Item2");
              ch.addItem("Item3");
              ch.addItem("Item4");
              f.add(ch, "choice");
              f.setSize(200, 200);
              f.setVisible(true);
          }
      }

            dav Andrei Dmitriev (Inactive)
            gramachasunw Girish Ramachandran (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: