/** * CalcApplet * * Uses Calc(). See Calc.java for details. * * R. Perry, Jan. 2000 */ import java.io.*; import java.awt.*; import java.applet.*; public class CalcApplet extends Applet { TextArea output; public void init () { setLayout( new BorderLayout()); output = new TextArea(); add( "Center", output); output.setEditable( false); validate(); } public void start() { try { output.append( "Opening new BigInteger Calculator window...\n"); new Calc(); } catch (Exception ex) { // ex.printStackTrace(System.out); ByteArrayOutputStream out = new ByteArrayOutputStream(); ex.printStackTrace( new PrintStream( out)); output.append( "\n" + out); } } }