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

regression 1.1.7 : scrollbar in choicebox is not scrollable

XMLWordPrintable

    • b01
    • x86
    • generic, windows_nt
    • Not verified

        regression in JDK 1.1.7: scrollbar in choicebox is not scrollable

        A very small test class attached as below uses only Java AWT code, to demonstrate the problem behavior, just compile and run the code. The failure is displayed as not been able to move the scroll bar in choicebox. Since the customer's product is only based on NT, this issue been only tested and reported against NT release 4.0 service pack 3.

        It works in JDK 1.1.6, JDK 1.2beta4, but not in 1.1.7 FCS.

        import java.awt.*;
        import java.awt.event.*;

        public class TestCase extends Frame {

            protected TestDialog testDialog;

            public static void main(String args[]) {
                TestCase tc = new TestCase();
            }

            public TestCase () {
                testDialog = new TestDialog(this);
                testDialog.setModal(true);
                testDialog.show();
            }

            class TestDialog extends Dialog {
        Choice chc;

        public TestDialog(Frame parent) {
        super(parent, "TestDialog", true);
                    addWindowListener(new WindowAdapter() {public void windowClosing(WindowEvent e) {System.exit(0);}});
                    setSize(200,100);
                    makeChoice();
                    Panel p = new Panel();
                    p.add(chc);
                    add(p, "Center");
                }

                protected void makeChoice() {
                    chc = new Choice();
                    chc.add("First");
                    chc.add("Second");
                    chc.add("Third");
                    chc.add("Fourth");
                    chc.add("Fifth");
                    chc.add("Sixth");
                    chc.add("Seventh");
                    chc.add("Eighth");
                    chc.add("Ninth");
                    chc.add("Tenth");
                    chc.add("Eleventh");
                    chc.add("Twelfth");
                    chc.add("Thirteenth");
                    chc.add("Fourteenth");
                    chc.add("Fifteenth");
                    chc.select(0);
                }
        }
        }

              rkhansunw Robi Khan (Inactive)
              duke J. Duke
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: