There are bunch of console programs and especially games using full redraw (not sure ho this correctly named) of console window.

For example, look at output of linux top program -> http://upload.wikimedia.org/wikipedia/commons/9/9f/Top_program.jpg

it doesn't just write text line by line all the time making the whole output oh thousands lines, but every second clears the screen and prints updated information.

Or another example of Apache Geronimo: during startup, it prints to console progressbar -> http://i.imgur.com/BYWf1Sq.jpg

My question is, how to reach the same result using Java?


Lanterna does this.

Lanterna is a Java library allowing you to write easy semi-graphical user interfaces in a text-only environment, very similar to the C library curses but with more functionality.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.