/** * TextAreaSTDOut.java * * Use this to send output from JMSL.out.println("whatever") to a text area * Useful for printing in Applets or Frames * * @author Phil Burk and Nick Didkovsky */ /* * (C) 1997 Phil Burk and Nick Didkovsky, All Rights Reserved * JMSL is based upon HMSL (C) Phil Burk, Larry Polansky and David Rosenboom. */ package jmsltutorial; import java.awt.TextArea; /** Useful STDOut for JMSL printing in Applets */ public class TextAreaSTDOut implements com.softsynth.jmsl.STDOutFunction { TextArea myTextArea; public TextAreaSTDOut(TextArea tx) { myTextArea = tx; } /** deliberately deprecated to run in web browsers */ public void print(String s) { myTextArea.appendText(s); } public void println(String s) { print(s + "\n"); } public void println() { print("\n"); } }