// The "TextDemo" class. import hsa.Console; import java.applet.*; import java.awt.*; public class TextDemo extends Applet { public static TextField input = new TextField(10); public static TextField output = new TextField(10); public void init () { add(input); add(output); } // init method public double getValue() { Double d = new Double(input.getText()); output.setText(String.valueOf(d)); return d.doubleValue(); } public boolean action(Event e, Object o) { double d = 0.0; d = getValue(); return true; } public void paint (Graphics g) { // Place the body of the drawing method here } // paint method } // TextDemo class