How to redirect console content to a textArea in Java?

user618111 picture user618111 · Feb 24, 2011 · Viewed 55.3k times · Source

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 (String[] args){
        System.out.println("Hello World");
    }
}

and I want to output the "Hello World" to a textArea, what actionPerformed do I have to choose?

Answer

camickr picture camickr · Feb 24, 2011

Message Console shows one solution for this.