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!

Using Task and Service to read from and write to a GUI

futrelleAug 8 2014 — edited Aug 9 2014

I have a database of 100,000 research articles, all as full text. From a GUI I'm building ( w. Scene Builder and NetBeans) I would like to enter a journal name and have some of the articles read into memory, in a background thread.  Then I would analyze them, also in a background thread.  Then I would write various results, e.g., lists of authors or titles, wordlists, to the GUI for examination by a user. 
There are some tutorials and discussions out there, e.g., Concurrency in JavaFX | JavaFX 2 Tutorials and Documentation, but I have yet to find any reasonably clear discussions or examples that directly address my question - how to create background threads from my model that will read from and write to a GUI using Tasks and/or Services. I have a lot of non-GUI-based code I've developed over the years to work with my documents, but the time has come to put a useful 'face' to it all.  I also have no problems building GUIs, but I'm only using the App thread for simple foreground actions to see how they work.

Answers or links would be much appreciated, since I won't have a working system until I solve this problem.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 6 2014
Added on Aug 8 2014
1 comment
1,311 views