|
|
|
|
|
|
SolutionDownload ButtonTest source code.HTML Interface to Applet<APPLET CODEBASE="/applets/magelang/AWT-Training/classes/" CODE="ButtonTest.class" WIDTH=70 HEIGHT=40 ALIGN=CENTER></APPLET> Java Codeimport java.awt.*; public class ButtonTest extends java.applet.Applet { public void init() { Button b = new Button("HIT ME"); add(b); } public boolean action(Event e, Object label) { System.out.println("Pressed " + label); return true; } } |