import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JApplet;
import javax.swing.JButton;
public class MainClass extends JApplet {
JButton button = new JButton("A very minimal applet");
public void init() {
System.out.println("parameter=" + getParameter("param"));
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.out.println("Button was clicked");
}
});
getContentPane().add(button);
}
}