Button with event handling
import java.awt.*;
public class HelloButton extends Frame {
public static void main(String argv[])
{
new HelloButton();
}
HelloButton() {
add("North", new MyButton("hello"));
resize(200, 200);
show();
}
}