Connecting Tech Pros Worldwide Forums | Help | Site Map

Clear Output Pane

Familiar Sight
 
Join Date: Mar 2008
Posts: 174
#1: Jun 16 '08
Is there a method I can use to delete all the text that has been outputted using the
System.out.println(""); method?



BigDaddyLH's Avatar
Moderator
 
Join Date: Dec 2007
Location: Kelowna, BC Canada
Posts: 1,212
#2: Jun 16 '08

re: Clear Output Pane


No in a platform-independent way. The simplest thing is to be happy with printing a few blank lines.
Familiar Sight
 
Join Date: Mar 2008
Posts: 174
#3: Jun 17 '08

re: Clear Output Pane


Quote:

Originally Posted by BigDaddyLH

No in a platform-independent way. The simplest thing is to be happy with printing a few blank lines.

Okay. Thanks amigo.
BigDaddyLH's Avatar
Moderator
 
Join Date: Dec 2007
Location: Kelowna, BC Canada
Posts: 1,212
#4: Jun 17 '08

re: Clear Output Pane


Quote:

Originally Posted by Kid Programmer

Okay. Thanks amigo.

Yeah, keep it simple and save the fun and games for Swing...
Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#5: Jun 17 '08

re: Clear Output Pane


You could of course "clear" the visible screen by printing lots of blank lines

Expand|Select|Wrap|Line Numbers
  1. void clrscr () {
  2.          for(int i = 0; i < 100;i++) {
  3.                     System.out.println("");
  4.          }
  5. }
Familiar Sight
 
Join Date: Mar 2008
Posts: 174
#6: Jun 17 '08

re: Clear Output Pane


Quote:

Originally Posted by r035198x

You could of course "clear" the visible screen by printing lots of blank lines

Expand|Select|Wrap|Line Numbers
  1. void clrscr () {
  2.          for(int i = 0; i < 100;i++) {
  3.                     System.out.println("");
  4.          }
  5. }

Okay that could work. The user could just scroll back up but whatever.
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#7: Jun 17 '08

re: Clear Output Pane


ps. you can also google for 'jcurses'.

kind regards,

Jos
Reply