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

TextArea's method append can not work correctly in Win95.

XMLWordPrintable

    • 1.2beta4
    • generic, x86
    • generic, windows_95
    • Verified

      JDK Version:1.2beta3-L
      OS:Win95
      Locale: All

      This is a awt bug not i18n bug.
      In Win95, When we use append method to append String in a TextArea,
      only the first letter of the whole string is added to the TextArea.
      In JDK1.1.4, this method work well.
      Following is a short program which can show this bug.

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

      public class CheckTextArea implements ActionListener {
          TextArea t;
          Button b;
          public static void main(String args[]) {
              new CheckTextArea();
          }

          public CheckTextArea() {
              Frame f = new Frame();
              b = new Button("Rest Text");
              b.addActionListener(this);
              t = new TextArea(20, 20);
              f.setLayout(new BorderLayout());
              f.add("North", b);
              f.add("South", t);
              f.pack();
              f.setVisible(true);
          }

          public void actionPerformed(ActionEvent e) {
              t.setText("");
              for (int i = 0; i < 20; i ++) {
                  t.append("My Number is " + i + "\n");
              }
          }
      }
      ======================================================================
      java CheckTextArea
      press the reset text button.


      jim.hu@prc 1998-03-12

            ehawkessunw Eric Hawkes (Inactive)
            jhusunw Jim Hu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: