I'm in the process of learning how to work with Java applets and have run into a small problem off the bat. My question is the same one that was answered here Java - Applet simply not displaying?, but, having followed the advice, I find that the problem persists.
I have the following applet:
import javax.swing.*;
import java.awt.*;
public class BlankAppletForTesting extends JApplet {
public void init() {
JLabel label = new JLabel("Tree.");
this.add(label);
}
}
My html file consists of:
<OBJECT
codetype="application/java"
classid="java:BlankAppletForTesting.class"
width="300" height="300">
</OBJECT>
I've got my init() method and am not using the deprecated applet tag. The applet seems to load - there is a white, 300x300 box in the browser - but no 'Tree.'. Any thoughts?