(Apple bug # 3305682)
Expected behavior: The 2 should not have been highlighted and the full "234" sequence should appear in the TextField. This is the behavior under all versions previous to 141DP102.
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.
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class PoofChar extends Applet implements KeyListener {
TextField textField;
Label textFieldLabel;
public void init()
{
setBackground(new Color(225,225, 255));
textField = new TextField("Initial chars");
textField.addKeyListener(this);
add(textField);
textFieldLabel = new Label("Initial label");
add(textFieldLabel);
}
public void keyPressed(KeyEvent ke){}
public void keyReleased(KeyEvent ke)
{
textFieldLabel.setText("Updated label");
textFieldLabel.invalidate();
invalidate();
validate();
}
public void keyTyped(KeyEvent ke){}
} // END OF Class PoofChar