I want to load up to nine panels in a TilePane. For each pane I have to run frist an computation of the content (about 300ms) and second have to build the Panel (about 500ms). What I want is, that there are nine ProgressIndicators which exchanges with every panel after its computation. I tried it with the Platform.runlater command as well as with a service class. The result was always the same. The ProgressIndicator are shown, but not animated. After seconds there all all panels at once. Is there a possibility, that the Indicators are animated the hole time and that I can exchange them one after another?
相关问题
- How to properly use Weld in JavaFX 2 application?
- How to upgrade/install Upstart deamon version 1.5
- There Was No Endpoint Listening at http // That Co
- Starting an Application from Windows Service
- JavaFX, MediaPlayer - volume trouble! Why the volu
相关文章
- Service层和Dao层一定要对应吗?
- k8s 访问Pod 时好时坏
- How do do an async ServiceController.WaitForStatus
- Async task does not work properly (doInBackground
- Keeping alive Intent Service after application is
- How to check if an activity is locked (app pinning
- A proper way to Debug a Service in Android Studio?
- Simple service in Swift, persists, foreground only
This is how I solved the problem:
JavaFX has Event Dispatch Thread which it uses for UI events. All work with UI should happen on this thread. And non-UI calculations shouldn't happen there to avoid lags in UI.
See next code:
The easiest way is by using lambdas and thread.