How can I make endless progress in Swing?

Like this question , I would like to do the same with Swing in Java. I searched for JProgressBar on NetBeans, but I could not find such an option. Is there another component that would accomplish this task, or is there an option in JProgressBar?

The reason for using this component in the same way is the same OP question.

+4
source share
3 answers

According to the Oracle Java tutorial, you can just use undefined mode for programmed bars in a swing:

yourProgressBar.setIndeterminate(true); 

Sometimes you cannot immediately determine the length of a long task, or the task may remain in the same completion state for a long time. You can show the work without tangible progress by setting the progress bar in undefined mode. The runtime progress bar displays an animation indicating that work is in progress.

+9
source
 progressBar.setIndeterminate(true); 
+1
source

Visible component to graphically display how much of the overall task is completed. See the β€œUsing Control Bars” section for information and an example of using a typical progress bar. The "Using Uncertainty Mode" section tells you how to animate the progress bar to show activity before the task scope is known.

read this document http://docs.oracle.com/javase/tutorial/uiswing/components/progress.html

0
source

Source: https://habr.com/ru/post/1485819/


All Articles