File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes System.out Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "System.out" Watch "System.out" New topic


Michael Remillard

Joined: Apr 16, 2004
Posts: 2
I would like to know what method (if available) allows me to do an equivalent of a "C" clrscr() when I am writing to the System.out with methods like "print()" or "println()".
Is this available or is java so caught up in streams that this concept just doesn't have its place here?

Anyway, let me know.

Michael Remillard<br /><br />
Joel McNary

Joined: Aug 20, 2001
Posts: 1824

Unfortunately, Java does not support anything like this. You may have redirected System.out to something like a file or a custom textbox. As such, the streams are blind to things like "screen size."
You could write your own (or find) a java-console that you could clear (or write your own method to print a lot of newlines), but as far as I know that is the extent to which you can do something like this.

Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Michael Remillard

Joined: Apr 16, 2004
Posts: 2
Thanks. I was beginning to get that feeling...
Oh well...
I agree. Here's the link:
subject: System.out
It's not a secret anymore!