July 2018
Intermediate to advanced
242 pages
8h 6m
English
Most of the JVM-based GUI frameworks have one thing in common—they run a specific thread that is responsible for updating the state of the application's UI. In this recipe, we're going to learn how to execute tasks asynchronously in the background and switch to the UI thread to update the GUI of the app. We're going to create a simple counter, which is going to display the incremented integer value every second. The mechanism responsible for infinite counter-incrementing should operate in the background, however, it should switch to the UI thread context every time it needs to perform an update of the UI state.
Read now
Unlock full access