Can anybody tell me if there is a way to clear the output screen. I am
making a basic low level program (just to improve my java skill) and I
am writing a lot of commands like:
System.out.println("There are "+x+" intems in the list");
So I was wondering if there is a way to clear the output screen, just to
make it look neater, or is there a way to clear a line so I can loop a
command like:
System.out.println("Processing is "+x+"% complete");
To show what percentage of work has been done.
Thank you kindly for your time
Chris Smith - 20 Feb 2006 18:14 GMT
> Can anybody tell me if there is a way to clear the output screen. I am
> making a basic low level program (just to improve my java skill) and I
[quoted text clipped - 5 lines]
> command like:
> System.out.println("Processing is "+x+"% complete");
Google "jcurses". You can't do what you're looking for with the
standard library.

Signature
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
TheFullSP - 20 Feb 2006 20:49 GMT
You will have to use a JFrame add a scrollpane and add a textarea
you can then manipultate the textarea's text
http://javaalmanac.com/egs/javax.swing.text/pkg.html
~Glynne - 21 Feb 2006 00:20 GMT
> Can anybody tell me if there is a way to clear the output screen. I am
> making a basic low level program (just to improve my java skill) and I
[quoted text clipped - 9 lines]
>
> Thank you kindly for your time
How about over-writing the current line during the loop, e.g.
System.out.print(" \r");
System.out.print("Processing is "+x+"% complete \r");
~Glynne