February 2019
Intermediate to advanced
450 pages
11h 59m
English
The ways that different toolkits and languages handle multithreading and graphical updates vary substantially. The following illustrations aim to highlight the complexity of this problem, in case you are not familiar with these constraints. The specifics sometimes vary based on language or version, but the concepts are usually consistent, otherwise software developed using the APIs would be very difficult to manage.
For our first example, consider an application written in Java. Its convention is that the graphics and user interaction are handled by a single event dispatch thread. Therefore, any change you wish to make to the user interface needs to be pushed to this thread using SwingUtilities.invokeLater():
SwingUtilities.invokeLater(new ...
Read now
Unlock full access