/** * Copyright (c): Uwe Schmidt, FH Wedel * * You may study, modify and distribute this source code * FOR NON-COMMERCIAL PURPOSES ONLY. * This copyright message has to remain unchanged. * * Note that this document is provided 'as is', * WITHOUT WARRANTY of any kind either expressed or implied. */ import java.applet.*; import java.awt.*; public class SimpleText extends Applet { TextField f; //-------------------- public void init() { f = new TextField(); f.setEditable(false); setLayout(new GridLayout(1,0)); add(f); validate(); write("init"); } //-------------------- public void start() { write("start"); } //-------------------- public void stop() { write("stop"); } //-------------------- public void destroy() { write("destroy"); } //-------------------- void write(String s) { System.out.println(s); f.setText(f.getText() + " " + s); repaint(); } } //--------------------