This month, Paul Furbacher continues his series on JavaFX 2.
Paul will dig a bit deeper into features and look at properties, bindings, tasks, and services.
To illustrate these, he'll look at a non-trivial application which binds progress updates to the user interface.
The sources of the updates are tasks, and those tasks are encapsulated in services.
The application will use Google's Geocoding Java API to get map data for the creation of map URLs used in a Web page, generated by the task.
Google throttles the use of its service, so if the application has a lot of maps to create (it does), it has to make requests at a reasonably slow pace.
If we didn't use a task on a separate thread, the application's UI would hang, and the user might not be happy about that.
|