/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Interface;

import java.io.PrintStream;
import java.io.OutputStream;
import javax.swing.JTextArea;
/**
 *
 * @author edward
 */
public class TextAreaPrintStream extends PrintStream {

    private JTextArea textarea;
    
    public TextAreaPrintStream(JTextArea area, OutputStream output) {
        super(output);
        textarea = area;
    }
    
    @Override
    public void println(String str) {
       textarea.append((str + '\n'));
    }
    
    @Override
    public void print(String str) {
       textarea.append(str);
    }
}

@@ -133,32 +133,55 @@
 io.PrintStream;%0A
+import java.io.Writer;%0A
 import java.io.O
@@ -435,16 +435,21 @@
 r(output
+,true
 );%0A     

Set PrintSteam to autoflush.