开发者

How to print vertical progress bar in console using Java? [closed]

开发者 https://www.devze.com 2023-03-22 19:54 出处:网络
开发者_JAVA百科It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form.
开发者_JAVA百科It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

How can we print a vertical progress bar in terminal console or command prompt using Java? A horizontal bar looks like this:

user#java PrintHorizontalProgressBar
5%#####

I want to print same progress bar but vertically.


Did you try to use System.out.println("*")? It is a sort of vertical progress bar.


for (int i = 0; i < maxProgress; i++) System.out.println("#");

[EDIT] Honestly, it was half a joke. I am not sure to see the usefulness of such progress bar... Now, to make my answer more useful, I think you might want to take a look at the Jansi project, it allows cross-platform handling of Ansi codes, including on the non-Dos Windows consoles that doesn't handle them easily.

0

精彩评论

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