Cursor hiding in TextFields on Macintosh

(Apple Problem ID# :2806457)

    The TextField methods setCaretPosition and requestFocus do not seem to work as expected on the Macintosh.  The applet above has 4 TextFields, all set to display the number 44.00.  On Macintosh OS 9 and OS 10.1 the following problems occur:

    Using invalidate and validate methods on the TextFields and applet do not fix the problems.

    Is this the expected behavior?  Are there other methods one must call before seeing the effect of the setCaretPosition and requestFocus methods?

    If you have any insights, workarounds or comments about this test page please contact Mickey Segal.  A listing of  many Macintosh Java bugs with demonstration applets is at this link, including information on how to add any necessary Java plugins.

    The source code is shown below and can be downloaded from this link:

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

public class CursorHiding extends Applet {

public void init()
{
    TextField tf1 = new TextField(5);
    add(tf1);
    tf1.setText("44.00");
    tf1.setCaretPosition(0);
    tf1.setForeground(Color.red);
    TextField tf2 = new TextField(5);
    add(tf2);
    tf2.setText("44.00");
    tf2.setCaretPosition(0);
    tf2.setForeground(new Color(150, 0, 150));
    TextField tf3 = new TextField(10);
    add(tf3);
    tf3.setText("44.00");
    tf3.setCaretPosition(0);
    tf3.setForeground(new Color(0, 150, 0));
    TextField tf4 = new TextField(10);
    add(tf4);
    tf4.setText("44.00");
    tf4.setCaretPosition(0);
    tf4.setForeground(Color.blue);

    tf2.requestFocus();
}
} // END OF Class CursorHiding