Description of both args of constructor is incorrect.
It's not the initial value and the incrementation value, it's the min and max values.
In this code example, it is not incremented by 20, it is incremented UNTIL it reaches 20.
The constructor JProgressBar() takes two argument as parameter in which, first is the initial value of the progress bar which is shown in the starting and another argument is the counter value by which the value of the progress bar is incremented. Here, the value of the progress bar is incremented by 20.
It should say ...
JProgressBar(int min, int max) Parameters: min - the minimum value of the progress bar. max - the maximum value of the progress bar.
View All Comments
| View Tutorial