import java.applet.* ; import java.awt.* ; public class GetInputFromUser extends Applet { TextField mytext ; public void init() { mytext = new TextField(20) ; add(mytext) ; } public void paint(Graphics g) { String s = mytext.getText() ; g.drawString(s, 40 , 50) ; } public boolean action(Event event, Object arg) { repaint() ; return true ; } }