FileDocCategorySizeDatePackage
SimpleClick.javaAPI DocExample971Tue Dec 12 18:57:26 GMT 2000None

SimpleClick

public class SimpleClick extends Applet

Fields Summary
StringBuffer
buffer
Constructors Summary
Methods Summary
voidaddItem(java.lang.String newWord)

        System.out.println(newWord);
        buffer.append(newWord);
        repaint();
    
public voiddestroy()

        addItem("preparing for unloading...");
    
public voidinit()

	buffer = new StringBuffer();
        addItem("initializing... ");
    
public booleanmouseDown(java.awt.Event event, int x, int y)

	addItem("click!... ");
	return true;
    
public voidpaint(java.awt.Graphics g)

	//Draw a Rectangle around the applet's display area.
        g.drawRect(0, 0, size().width - 1, size().height - 1);

	//Draw the current string inside the rectangle.
        g.drawString(buffer.toString(), 5, 15);
    
public voidstart()

        addItem("starting... ");
    
public voidstop()

        addItem("stopping... ");