"NeoPhreak" <admin@neophrea k.com> wrote in message
news:vScsb.3128 $IK2.284199@new s20.bellglobal. com...[color=blue]
> How would you clearn the screen in a console program???
>[/color]
Console control is not Java's strong point. Generally there are three
approaches to this task:
* Use 'System.out.pri ntln' to write out enough space characters to
fill the screen [doesn't, however, provide very effective cursor
control :) !]
* If the console suports ANSI escape sequences, then the
following will do the trick:
* Use a JNI routine that makes the relevant OS system
call to perform this task. You should find these in
console-based libraries - do a search for JCurses or
any other Java-based Curses implementation
I hope this helps.
Anthony Borla
P.S.
Forget about your Java program responding to single keystrokes [i.e. without
the need to press ENTER]. Again, a suitable JNI routine or package like
JCurses is required
On Tue, 11 Nov 2003 16:52:45 -0500, "NeoPhreak" <admin@neophrea k.com>
wrote:
[color=blue]
>How would you clearn the screen in a console program???
>
>Thanks
>NeoPhreak >.<
>[/color]
Depends on the operating system... on Windows 9x and most flavors of
Unix (in a terminal window) you can use:
"NeoPhreak" <admin@neophrea k.com> wrote in message
news:vScsb.3128 $IK2.284199@new s20.bellglobal. com...[color=blue]
> How would you clearn the screen in a console program???
>
> Thanks
> NeoPhreak >.<
>
>[/color]
--
Tony Morris
(BInfTech, Cert 3 I.T., SCJP[1.4], SCJD)
Software Engineer
IBM Australia - Tivoli Security Software
"Denz" <RUBBISHdgeller t@RUBBISHhotmai l.com> wrote in message
news:tBgCb.4951 7$aT.42373@news-server.bigpond. net.au...[color=blue]
> Never did find a way to do that ...
> cheers
>
> "NeoPhreak" <admin@neophrea k.com> wrote in message
> news:vScsb.3128 $IK2.284199@new s20.bellglobal. com...[color=green]
> > How would you clearn the screen in a console program???
> >
> > Thanks
> > NeoPhreak >.<
> >
> >[/color]
>
>[/color]
Comment