Quantcast
Channel: Andrew van der Westhuizen
Viewing all articles
Browse latest Browse all 10

Command-line progress bar

$
0
0
[================> ] 33% I frequently need a progress bar for applications, in order to visualize what is going on in the application. Below is a Java implementation of one. private static int lastPercent; public static void updatePercentageBar(float progress) { int percent = (int) Math.round(progress * 100); if (Math.abs(percent - lastPercent) …

Viewing all articles
Browse latest Browse all 10

Trending Articles