0
votes

I know you should only use the JavaFX main thread to update the UI and that you can use Platform.runLater(...); to update the UI from a different thread. However I am trying to make a real time scrolling chart axis. At the moment I have background thread which is running periodically that translates the axis and adds new nodes to one end and removes the old nodes from the other. However this uses Platform.runLater(...) to modify the nodes and I have noticed that when the javaFX thread is busy else where on the UI there is a delay in updating the axis and this causes problems with scaling.

So is there a way you can a region of UI where the nodes within that region are controlled and managed by a non-JavaFX? The region only need to be updated to the UI at the request of the JavaFX.

1

1 Answers

0
votes

I might be wrong with understanding your question, but you can unbind your heavy computation and outsource it to a thread pool. Then run Platform.runLater(...); upon completion to update your Scene Graph.