home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 August / PCO0897.ISO / filesbbs / os2 / fp1os2.arj / OS2 / DATA / 49 / C / 0 / F_26836 / SJDbgPrintStream.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-05-15  |  820 b   |  25 lines

  1. import java.awt.TextArea;
  2. import java.io.PrintStream;
  3.  
  4. class SJDbgPrintStream extends PrintStream {
  5.    private TextArea aTextOutputArea;
  6.  
  7.    public SJDbgPrintStream(TextArea var1) {
  8.       super(System.out);
  9.       this.aTextOutputArea = var1;
  10.    }
  11.  
  12.    public synchronized void println(String var1) {
  13.       this.print(var1);
  14.       this.print("\n");
  15.    }
  16.  
  17.    public synchronized void print(String var1) {
  18.       if (this.aTextOutputArea != null) {
  19.          this.aTextOutputArea.appendText(var1);
  20.       }
  21.  
  22.       super.print(var1);
  23.    }
  24. }
  25.