3

I wonder how to animate multiple lines, like what Docker does. I'm hoping for a Java or C++ example, but I don't think it matters with ANSI.

macbook: bill$ docker pull jenkins
Using default tag: latest
latest: Pulling from library/jenkins
55cbf04beb70: Downloading  457.4kB/45.31MB
1607093a898c: Downloading  572.6kB/10.74MB
9a8ea045c926: Downloading  621.7kB/4.336MB
d4eee24d4dac: Waiting 
c58988e753d7: Waiting 

This question only handles one line. As does this other well-known question/anwer. Clearing the screen and returning home doesn't seem to work either, because is seems newlines remain regardless of flushing, using the clear screen character, or using the home character.

NonCreature0714
  • 5,744
  • 10
  • 30
  • 52
  • Do some research into things like [curses](https://www.google.com/search?client=safari&rls=en&q=curses+api&ie=UTF-8&oe=UTF-8). Just beware, Java's console handling is pretty primitive. It's hard to know, but something like [fusesource/jansi](https://github.com/fusesource/jansi) might work – MadProgrammer Feb 25 '19 at 23:34
  • Also, read the `tput` man page – glenn jackman Feb 26 '19 at 02:44

0 Answers0