For Programmers: Free Programming Magazines  


Home > Archive > Java Help > September 2004 > Clear screen









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Clear screen
Glenn & Jacqui

2004-09-22, 9:10 am

Hi,

I was just wondering if anyone can tell me how do I get java to clear the
screen.

I know there is a cls; command in C but I cant find one for Java.

Thanks
Jacqui


Stefan Schulz

2004-09-22, 9:10 am

On Wed, 22 Sep 2004 19:06:12 +1000, Glenn & Jacqui
<glenn.hansen@tpg.com.au> wrote:

> Hi,
>
> I was just wondering if anyone can tell me how do I get java to clear the
> screen.
>
> I know there is a cls; command in C but I cant find one for Java.


There is no such function in Java. Java is platform-independant, and
consider:
Some platforms might not even have such a function in their libraries.

That being said, you can use your cls function (which i assure you, is not
part of standard C either) by JNI. However, you lose platform independance
when you do that, and you (usally, unless the User explicitly allows) can
not use such code from Applets.

Of course, you can just print a few dozen newlines, but i guess that is
not what you wanted to do ;)

See you
Stefan

--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com