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.
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.
progressBar.setIndeterminate(true);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With