Posted By:
Tim_Rohaly
Posted On:
Sunday, July 8, 2001 08:33 PM
Control over the screen is a terminal-dependent operation.
Specifically, terminals or terminal emulators each have
their own specific set of commands (and escape characters
for those commands) that a program may send in order
to invoke the terminal-specific capabilities. You can also
do this from Java, but it would require you to basically
develop your own terminal capabillites API in order to support
more that one terminal type.
vi (written by Bill Joy!) for instance makes use of the
UNIX termcap database to perform its magic of
writing to any part of a terminal screen, regardless of terminal type.
The curses API under UNIX (written by Ken Arnold!) is
a higher-level program interface to the termcap database - curses
is a way to do what you need in a terminal-independent manner.
There are a number of Java bindings for curses,
see the FAQ at http://www.jguru.com/faq/view.jsp?EID=312906
for links and additional discussion of this problem.