The following trivial applet fails to display the label:
AppletTest.html:
-----
<applet codebase="." code="AppletTest" width="400" height="200"></applet>
-----
AppletTest.java:
-----
import java.applet.*;
import java.awt.*;
public class AppletTest extends Applet {
public void init() {
setLayout(new BorderLayout());
add(new Label("test"), BorderLayout.CENTER);
}
}
I've tried many variants such as
add("Center", new Label("test"));
and not setting the layout and using the default layout with
add(new Label("test"));
None of them display. They all work if I use JDK 1.5.
I also tried with the (not yet released) JDK 1.6.0_02, which also fails.
I'm using firefox with the Java plugin (version verified using about:plugins).
AppletTest.html:
-----
<applet codebase="." code="AppletTest" width="400" height="200"></applet>
-----
AppletTest.java:
-----
import java.applet.*;
import java.awt.*;
public class AppletTest extends Applet {
public void init() {
setLayout(new BorderLayout());
add(new Label("test"), BorderLayout.CENTER);
}
}
I've tried many variants such as
add("Center", new Label("test"));
and not setting the layout and using the default layout with
add(new Label("test"));
None of them display. They all work if I use JDK 1.5.
I also tried with the (not yet released) JDK 1.6.0_02, which also fails.
I'm using firefox with the Java plugin (version verified using about:plugins).