"why is not swing “thread safe”? [closed]" Code Answer


javin poul's programming blog java revisited has a great blog post about this:

why swing is not thread-safe in java?

it's the decision taken by there designer, at that time. since making an api thread-safe takes a lot of work, and it's often based upon benefit you get. since gui screens are mostly updated in response of user action e.g. when user click a button, and since events are handled in the same event dispatcher thread, it's easy to update gui on that thread. it's very rare, when an update request for gui comes from a different thread e.g. may be once a network request is complete or a file is loaded.

By Robert Harvey on January 4 2022

Answers related to “why is not swing “thread safe”? [closed]”

Only authorized users can answer the Search term. Please sign in first, or register a free account.