I\'m trying to get the content of console in a textArea in java.
For example if we have this code,
class FirstApp {
public static void main (Stri
One of the way you can do it by setting the System OutputStream to a PipedOutputStream and connect that to a PipedInputStream that you read from to add text to your component, E.g
PipedOutputStream pOut = new PipedOutputStream();
System.setOut(new PrintStream(pOut));
PipedInputStream pIn = new PipedInputStream(pOut);
BufferedReader reader = new BufferedReader(new InputStreamReader(pIn));
Have u looked at the following link ? If not, then you must.