问题描述:

ProgressBar pb = new ProgressBar(0.0);

pb.setProgress(1.0 - (1.0 / ((1.0 * 60) / 15000)));

I want progress bar show 60min state, but when left 15000min not really showing state.

网友答案:

1.0 - (1.0 / ((1.0 * 60) / 15000)) resolves to -249.0. A negative number indicates that you want to show indeterminate progress, which is why the progress bar will not show an actual value. Set the progress to a positive number between 0.0 and 1.0, or rather adapt your math accodingly.

相关阅读:
Top