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 154863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:03:15+00:00 2026-05-11T10:03:15+00:00

There are many methods you shouldn’t call if you are not on the AWT

  • 0

There are many methods you shouldn’t call if you are not on the AWT event thread. These are generally methods that manipulate the UI in some way.

Is this the case with Component’s getGraphicsConfiguration(…)? It is only a getter but it appears to cause a deadlock if the event thread is waiting on the thread calling this method.

Whilst solving the deadlock is fairly trivial (avoid using wait or synchronize on the event thread), should I only be calling getGraphicsConfiguration in a Runnable passed to SwingUtilities.invokeLater(…) or invokeAndWait(…)?

  • 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. 2026-05-11T10:03:16+00:00Added an answer on May 11, 2026 at 10:03 am

    AWT thread-safety is (necessarily) broken. Just don’t go anywhere near it. Stay on the straight AWT EDT

    Also note that just because a method is in java.awt.Component, it does not mean that the object (or an object referenced by it) is not in Swing and therefore really not even pretending to be thread-safe at all. (Enough nots?)

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

Sidebar

Related Questions

There are many Cocoa methods that require an NSError object as a parameter to
There are many methods for representing structure of a program (like UML class diagrams
I am using Spring with Hibernate in my project.There are many methods written in
In methods of controllers, there are usually many checks for doing the right thing.
There are many similar questions, but I didn't find one that gets straight to
First of all... Sorry for this post. I know that there are many many
When using a boost::asio::ip::tcp:socket there are many methods one can use to write/send data.
Objective-C categories are extremely useful, but there are some problems with this power. These
I have a bunch of different methods that are not supposed to run concurrently,
Either my debugger is broken or there's something fundamental that I am not understanding.

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.