Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JavaFX UI unResponsive

haryshSep 29 2013 — edited Oct 6 2013

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.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 3 2013
Added on Sep 29 2013
5 comments
1,807 views