Sunday, 15 April 2012

java - JavaFX refresh Progress Bar within a method -



java - JavaFX refresh Progress Bar within a method -

i have javafx progressbar in ui , have loop. in every iteration of loop happens:

progressval += 5.0; progress.setprogress(progressval);

and after whole loop, happens:

progress.setprogress(100);

i have recognized ui controls refreshed after method has finished, progress bar wont update until end , set 100 imidiatly.

so possible somehow forcefulness ui update, when method isn`t finished completly? or how else this?

quotation java doc:

the actual progress of progressindicator. negative value progress indicates progress indeterminate. positive value between 0 , 1 indicates percentage of progress 0 0% , 1 100%. value greater 1 interpreted 100%.

that means in simple words, must split value 100, or increment value 0.05 instead of 0.5.

happy coding, kalasch

java javafx progress-bar

No comments:

Post a Comment