1

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?

Community
  • 1
  • 1
user123403
  • 31
  • 4
  • Use the [Deployment Toolkit Script](http://docs.oracle.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html#deplToolkit) to write whatever element that (version of that) browser needs.. – Andrew Thompson Jul 26 '14 at 11:41

0 Answers0