I need a simple of way of redirecting output from the console to a custom GUI that I have made i.e. Text Area or Text Box. Am looking for a way of making the PrinStream to be attached to my custom gui so as to output the contents of System.out

So far, this is what I've done:

OutputStream redirect = System.out;
PrintStream out = new PrintStream(redirect);
System.setOut(out);

Any ideas???

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.