public void init() {
Label label;
label = new Label("Hello Container");
this.add(label);
}
The key thing to remember about adding components to the applet is the three steps:
The first two steps must be performed when creating an instance of any class so it's really only the third that's new.
You normally combine the three steps into two like this:
Label label = new Label("Hello Container");
this.add(label);