Applet demonstrating bugs in the Java implementation in Mac OS X public beta (Apple follow-up #  1413691, Apple bug # 2582837)

(source code provided below)

Component Windows* OS 9 MRJ** OS X beta
       
Serif Checkbox OK OK OK
TimesRoman Checkbox OK OK Only a tiny dot appears
Serif TextField OK OK OK
TimesRoman TextField OK OK Text displaced up
Serif Choice OK OK OK
TimesRoman Choice OK OK Item absent, crash when used
Disabled Choice OK OK Item not grayed
Enabled Label OK OK OK
Disabled Label OK Not grayed*** Not grayed***
Label with red text OK No red text*** No red text***
TimesRoman text painted OK OK Font not set
Serif text painted  OK OK OK

* Internet Explorer 5.5, Netscape 4.7, Netscape 6.0
** Internet Explorer 5, Netscape 6.0
*** Apple has maintained in the past that these methods are not implemented because Macintosh consistency should overrule Java consistency, but others maintain that the developer should have the freedom to choose either approach.


     

    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 OSXBugs extends Applet {


public void init() 
{
// the following worked properly under OS 9 
    Checkbox serifBox = new Checkbox("Serif");
    serifBox.setFont(new Font("Serif",Font.BOLD,20));
    add(serifBox);
    Checkbox romanBox = new Checkbox("TimesRoman");
    romanBox.setFont(new Font("TimesRoman",Font.BOLD,20));
    add(romanBox);
    TextField serifTF = new TextField("Serif");
    serifTF.setFont(new Font("Serif",Font.BOLD,20));
    add(serifTF);
    TextField romanTF = new TextField("TimesRoman");
    romanTF.setFont(new Font("TimesRoman",Font.BOLD,20));
    add(romanTF);
    Choice serifChoice = new Choice();
    serifChoice.setFont(new Font("Serif",Font.BOLD,20));
    serifChoice.addItem("A Serif item");
    add(serifChoice);
    Choice romanChoice = new Choice();
    romanChoice.setFont(new Font("TimesRoman",Font.BOLD,20));
    romanChoice.addItem("A TimesRoman item");
    add(romanChoice);
    Choice disabledChoice = new Choice();
    disabledChoice.setFont(new Font("Serif",Font.BOLD,20));
    disabledChoice.addItem("A disabled item");
    disabledChoice.disable();
    add(disabledChoice);

// the following didn't work properly under OS 9 
    Label enabledLabel = new Label("Enabled label");
    enabledLabel.setFont(new Font("Serif",Font.BOLD,20));
    add(enabledLabel);
    Label disabledLabel = new Label("Disabled label");
    disabledLabel.setFont(new Font("Serif",Font.BOLD,20));
    disabledLabel.disable();
    add(disabledLabel);
    Checkbox redBox = new Checkbox("Red");
    redBox.setFont(new Font("Serif",Font.BOLD,20));
    redBox.setForeground(Color.red);
    add(redBox);
}

public void paint(Graphics g)
{
    g.setFont(new Font("TimesRoman",Font.BOLD,20));
    g.drawString("TimesRoman", 100 , 300);
    g.setFont(new Font("Serif",Font.BOLD,20));
    g.drawString("Serif", 100 , 325);
}
} // END OF Class OSXBugs