开发者

Console output changing in java

I am writing a console app in java. Is there a way to change certain lines in the console to new values so it looks a bit dynamic or even clear the whole screen?

The console I am using is the one in jc开发者_如何学Goreator.


You could try one of these

  • http://javacurses.sourceforge.net/
  • http://www.pitman.co.za/projects/charva/


Once you print it out, you've lost control. If you want to be able to dynamically update it and do what you're trying to do, consider using a JTextPane (or whichever text component suits you best) as a custom console instead of the default console.


I think the only thing you can do is print out new lines with the values you need on them. To clear the screen you would need to just print a bunch of blank lines.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜