This post follows my previous post Ajax/PHP/Mysql/Canvas Drawing a circular genome, my notebook. The problem here, is drawing a circular genomic map that might contain a huge number of data and using an asynchronous method to fetch and display the data. Here, the server returning some JSON data is the same as in the last post but I now use a Java Swing client to fetch and display the data. Here again, the code is just a draft and I wouldn't write my final code like that.
The client is a javax.swing.JFrame. When the frame is opened, it opens a new Thread calling the server and fetching the JSON data (I previously described a JSON parser here). Once the data have been fetched, it can be only drawn in the Swing-Thread (all code that might affect or depend on the state of that component should be executed in this event-dispatching thread), that's why the drawing area is painted inside a
No I wonder it it would be worth trying to implement this using Java-FX.