FileDocCategorySizeDatePackage
LamePrintThread.javaAPI DocExample1357Tue Dec 12 18:57:26 GMT 2000None

LamePrintThread

public class LamePrintThread extends Applet

Fields Summary
TextArea
display
Constructors Summary
Methods Summary
voidaddItem(java.lang.String newWord)

        System.out.println(newWord);
        display.appendText(newWord + "\n");
        display.repaint();
    
public voiddestroy()

        addItem("destroy: " + threadInfo(Thread.currentThread()));
    
public voidinit()


       
        //Create the text area and make it uneditable.
    	display = new TextArea(1, 80);
        display.setEditable(false);

	//Set the layout manager so that the text area 
	//will be as wide as possible.
        setLayout(new GridLayout(1,0));

	//Add the text area to the applet.
        add(display);
        validate();

        addItem("init: " + threadInfo(Thread.currentThread()));
    
public voidstart()

        addItem("start: " + threadInfo(Thread.currentThread()));
    
public voidstop()

        addItem("stop: " + threadInfo(Thread.currentThread()));
    
java.lang.StringthreadInfo(java.lang.Thread t)

        return "thread=" + t.getName() + ", "
               + "thread group=" + t.getThreadGroup().getName();