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

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

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.2beta4
    • CPU:
      generic, x86
    • OS:
      generic, windows_95
    • Verification:
      Verified

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: