Reputation: 7025
Like this question, I'd like to do the same with Swing in Java. I looked for the JProgressBar on NetBeans, but I couldn't find an option like that. There is another component that would perform this task or there is an option in the JProgressBar?
The reason for using this component in this way is the same of that question's OP.
Upvotes: 4
Views: 3199
Reputation: 1513
A visible component to graphically display how much of a total task has completed. See Using Determinate Progress Bars for information and an example of using a typical progress bar. The section Using Indeterminate Mode tells you how to animate a progress bar to show activity before the task's scope is known.
read this doc http://docs.oracle.com/javase/tutorial/uiswing/components/progress.html
Upvotes: 0
Reputation: 14023
According to the Oracle Java Tutorial you can simply use the indeterminate mode for progess bars in swing:
yourProgressBar.setIndeterminate(true);
Sometimes you can't immediately determine the length of a long-running task, or the task might stay stuck at the same state of completion for a long time. You can show work without measurable progress by putting the progress bar in indeterminate mode. A progress bar in indeterminate mode displays animation to indicate that work is occurring.
Upvotes: 10