Hi felicitas,
after adding the component at run time u need to invalidate() and validate() the applet.
here is a working code which u can run and see
------------------------------------------------------------
java file import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class DynApplet extends Applet
{
Button b = new Button("Label Generater");
public DynApplet()
{
add(b);
b.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae)
{
DynApplet.this.add(new Label("Nascent Label"));
System.out.println("label Added");
DynApplet.this.invalidate();
DynApplet.this.validate();
}
});
}
}
html file html
applet
code = DynApplet.class
width = 300
height = 200
applet
/html
------------------------------------------------------------
regards
deekasha