import Java.applet.*;
import java.awt.*;
/** This demo uses JDK 1.0 event model for browser compatibility
Here is the supporting Html code:
<applet code=SimpleApplet width=200 height=100></applet>
**/
public class SimpleApplet
extends Applet
{
Label l = new Label("Please click the button", Label.CENTER);
Button b = new Button("Click it!");
public void init()
{
setLayout(new BorderLayout());
add("Center", b);
add("South", l);
}
public boolean action(Event event, Object what)
{
if (event.target == b)
{
l.setText("Hello World!");
return true;
}
return false;
}
}