My problem is that I need:
- One thread to receive UDP data containing cartesian coordinates.
- JavaFX thread (function?!) to print these coordinates on the scene.
So I continuously receive the data from the UDP Socket and I save the data in a BlockingQueue. The queue is common to JavaFX thread and UDP_read thread. Now, I need a JavaFX scene (function?!) that continuously takes the data from the queue and print (render/ illustrate) these coordinates (with rectangles or other shapes) on the scene, but I can't use a While-loop in a JavaFX thread.
I've tried with the Task
class but it seems to be useful only when the task
is limited in time and not continuous.
Any help is appretiated