Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8879491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:57:42+00:00 2026-06-14T19:57:42+00:00

I heard many times that Java Swing threading model is wrong. I don’t fully

  • 0

I heard many times that Java Swing threading model is wrong. I don’t fully understand why, I know that the problem is related to the fact that you can draw on a Drawable from another thread other than the main UI thread. I know that there are utility functionalities like SwingUtilities.invokeAndWait and SwingUtilities.invokeLater that let you do your painting in a Runnable, that in turn is run by the Event Dispatcher thread. I guess that this way you ensure that painting is done synchronously and this doesn’t leave the buffer in an incosistent state.

My question is: how do “good” UI toolkits behave? What solutions are adopted?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T19:57:43+00:00Added an answer on June 14, 2026 at 7:57 pm

    Brian Goetz’s Java Concurrency in Practice,

    9.1 Why are GUIs single-threaded?:

    …In the old days, GUI applications were single-threaded and GUI events
    were processed from a “main event loop”. Modern GUI frameworks use a
    model that is only slightly different: they create a dedicated event
    dispatch thread (EDT) for handling GUI events. Single-threaded GUI
    frameworks are not unique to Java; Qt, NextStep, MacOS Cocoa, X
    Windows, and many others are also single-threaded. This is not for
    lack of trying; there have been many attempts to write multithreaded
    GUI frameworks, but because of persistent problems with race
    conditions and deadlock, they all eventually arrived at the
    single-threaded event queue model in which a dedicated thread fetches
    events off a queue and dispatches them to application-defined event
    handlers…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just a question for my own curiosity. I have heard many times that it's
I have heard it many times that garbage collection in PyS60 is not up
I heard many times that postgres handles exists queries even faster then left join
I heard many times that the assembler and linker need to traverse its input
I heard this term many times when I came across some protocol implementations, but
I have heard from many people that usage of templates make the code slow.
I'm starting to learn Haskell and I've heard that many Haskell compilers have especially
Has anyone ever heard of overriding too many classes in Java? Perhaps this issue
I have heard the term unit testing many times and I am wondering how
I am working on a java web application that gets hit about 400,000 times

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.