TextField.getText fails to report String

(Apple problem # 3766375)

Summary:
This applet shows a failure of TextField.getText to report a digit typed into a TextField. Typing a single digit into the TextField sends reports to the Console.

Steps to Reproduce:
1. Find a slow computer such as my 400 MHz 192 MB RAM G4.
2. Restart the computer.
3. Open Safari and go to this page displaying the applet (source code is below).
4. Type the digit 8 into the TextField.
5. Type the digit 8 into the TextField again.
6. Open the Console to examine the applet output.

Expected Results:

The console should display:

keyInt = 56
X textFieldString = 8
keyInt = 56
X textFieldString = 88

Actual Results:

Sometimes but not always the console displays:

keyInt = 56
X textFieldString =
keyInt = 56
X textFieldString = 88

In all cases, even when TextField.getText fails to report the contents of the TextField, each 8 character appears in the TextField.

Workaround:
None.

Isolation:
The problem seems much more frequent on the first run of the applet after restarting the computer.

If you have any insights, workarounds or comments about this test page please contact Mickey Segal.  A listing of  many Java resources is at this link.

Source code:

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

public class lost_key extends Applet implements KeyListener {

TextField textField;

public void init()
{
    setBackground(new Color(225,225, 255));
    Label typeLabel = new Label("Type into the TextField: ");
    add(typeLabel);
    textField = new TextField("", 10);
    textField.addKeyListener(this);
    add(textField);
    textField.requestFocus();
}

public void keyReleased(KeyEvent ke)
{
    int keyInt = ke.getKeyCode();
    if (ke.getSource() == textField)
    {
        System.out.println("keyInt = " + keyInt);
        int caret = textField.getCaretPosition();
        String textFieldString = textField.getText();
        System.out.println("X textFieldString = " + textFieldString);
    }
}

public void keyPressed(KeyEvent ke){}

public void keyTyped(KeyEvent ke){}
} // END OF Class lost_key