(Apple bug # 2670892)
In the applet above, clicking the button should change the text
of the Label. On Internet Explorer 5.1 Preview for OS X this does not
occur on mouseUp; instead it occurs only when the mouse is moved. There are
messages in the Console about lost mouseUp events. This is fixed in
OS 10.1 with MRJ 3.1.
The mouseUp problem does not occur in other environments such
as Applet Launcher for OS X. Other problems do occur, but those are
discussed at LabelText.
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 LabelText extends Applet {
Label label;
Button button;
public void init()
{
label = new Label("Six words in a yellow label");
label.setBackground(Color.yellow);
add(label);
button = new Button("Change label text");
add(button);
}
public boolean action(Event evt, Object obj)
{
if (evt.target == button)
{
label.setText("Short text");
label.invalidate();
validate();
}
return super.action(evt, obj);
}
} // END OF Class LabelText