Hi,
I am writing up a desktop Java FX application.
I am facing random UI freezes when running the application.
In the application I have a Tab Pane, in one of the Tabs I am adding a custom class ( which extends pane ).
I have a canvas in the Pane where I have some animations running.
The data on which the animation should be based on is read from a class's object(constantly updated by a daemon thread), and I perform calculations(co.ordinates) for the shapes inside a "Animation timer"
I profiled the application and found out that, the "JavaFX Application thread" sometimes goes on a wait status when the quantum rendered is running.
I can see the other threads in the application run fine. And the freezing happens like 1/4 times on average.
1)What am I doing wrong?
2)Should I be moving the co.ordinates calculation out of the Animation Pane into a separate thread?
I would like the UI to be responsive. Please tell me what I should be doing.
PS: I am not a expert in Java and I am new to JavaFX, So please help me.