Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to display the real-time console output to a JTextField in the GUI ?  RSS feed

 
Ellen Zhao
Ranch Hand
Posts: 581
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to monitor all the real-time logging infomation in a JTextField, which sits in a JScrollPane on the GUI. How to redirect the console output to this JTextField? Many thanks in advance!

Regards,
Ellen
 
Petr Blahos
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I have never tried this, but what about using System.setErr and
System.setOut to send output to your own PrintStream instead of to
console?

Petr
 
Jini Jini
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at this page.

http://codeguru.earthweb.com/java/articles/382.shtml

Regards
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!