Displaying println output on GUI
Hello all,
I am a Java newbie. I have been writing some mini programs for personal use, although they are all command line / console apps. I have one completed program which I really want to add in GUI.
The problem is, I have used many System.out.println / System.err.println throughout the program. If I am adding in GUI elements, say a text box, how can I catch all output to console and stuff them into this text box? The last thing I want to do is go through each println and change it to a GUI-relevant line. :(
Please bare in mind I am a newbie, I would appreciate if someone can break it down and explain it down to newbie level. Some sample code would be nice. :D
Thank you!
P.S. There is another slightly off-topic question. It would be great if someone can give me some hints on that too. What's the quickest and simplest way to add in Swing into a command-line program and transform it to a GUI? I am in the process of doing so, but I think I am not going very far. I am taking too long and experiencing many problems here and there. I guess I have started off in the wrong direction.