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

Changing Choice and Label's content will cause application crash on Win95.

XMLWordPrintable

    • x86
    • windows_95

      JDK Version: 1.2Beta3-N
      OS: Win95
      Locale: en, zh, zh_TW

      On win95, if we change the item of Choice, sometimes will caused an application error, and windows will closed the whole application. Label has the same problem. Following is a test program to check this problem of Choice.

      =========================CheckChoice.java======================================
      import java.awt.*;
      import java.awt.event.*;

      public class CheckChoice {
          Choice choice;
          Frame f;
          public static void main(String args[]) {
              new CheckChoice();
          }

          public CheckChoice() {
              f = new Frame();
              choice = new Choice();
              f.addWindowListener(new WindowAdapter() {
                  public void windowClosing(WindowEvent we) {
                     f.dispose();
                     System.exit(0);
                  }
              });
              f.add(choice);
              f.pack();
              f.setVisible(true);
              addData();
              removeData();
              addData();
              removeData();
          }

          private void addData() {
              String data =
                  "\u3000\u3001\u3002\u3003\u3004\u3005\u3006\u3007" +
                  "\u3008\u3009\u300a\u300b\u200c\u300d\u3000\u3001" +
                  "\u3002\u3003\u3004\u3005\u3006\u3007\u3008\u3009" +
                  "\u300a\u300b\u200c\u300d";
              try {
                  Thread.sleep(200);
              } catch (Exception ex) {};
              for (int i = 0; i < 50; i ++) {
                  choice.addItem(data);
              }
          }

          private void removeData() {
              try {
                  Thread.sleep(200);
              } catch (Exception ex) {};
              if (choice.getItemCount() > 0) {
                  choice.removeAll();
              }
          }
      }

      cindy.jao@eng 1998-04-01

            Unassigned Unassigned
            cjaosunw Cindy Jao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: