I want to get all the stream that I output using System.out.println(...)
in the JTextArea and the code below does that absolutely fine however, I have lots of those printlns but the way they are printed in my console is a 'one-off' process. I mean they are being printed right at the end of running my program and not 'sequentially' so I could actually see it like in the real console log. I output some data about documents I scan, keywords found in a document etc so there's lots of code.
PrintStream out = new PrintStream( new TextAreaOutputStream( consoleTextArea ) );
System.setOut( out );
System.setErr( out );
I want to be able to only print those console lines in the consoleTextArea but not all in one go. This make a user feel that the program has frozen and no output is being displayed.