What does it mean to be "thread safe"?

What does it mean to be "thread safe"?
I am working with a team on a project here at work. Someone here suggested that we build all of our screens during the initialization of the application to save time later. During the use of the application, the screens would then be made visible or invisible.
One of the objections to that idea was that the swing components (many of which we use) are not thread safe. Can anyone tell me what the relevance of that is?
Thanks

To understand why Swing is not thread safe you have to understand a little bit of history, and a little bit of how swing actually works. The history(short version) is that it is nearly impossible to make a GUI toolkit thread safe. X is thread safe(well, sorta) and it's a really big mess. So to keep things simple(and fast) Swing was developed with an event model. The swing components themselves are not thread safe, but if you always change them with an event on the event queue, you will never have a problem. Basically, there is a Thread always running with any GUI program. It's called the awt event handler. When ever an event happens, it goes on an event queue and the event handler picks them off one by one and tells the correct components about it. If you have code that you want to manipulate swing components, and you are not ON the awt thread(inside a listener trail) you must use this code.
SwingUtilities.invokeLater( new Runnable() {
  public void run() {
    // code to manipulate swing component here
});This method puts the defined runnable object on the event queue for the awt thread to deal with. This way changes to the components happen in order, in a thread safe way.

Similar Messages

  • What does this mean:Photoshop 13.1.2 for Creative Cloud Installation failed. Error Code: U44M1P7

    What does this mean:Photoshop 13.1.2 for Creative Cloud Installation failed. Error Code: U44M1P7
    I found the manual update, which worked!
    http://www.adobe.com/support/downloads/thankyou.jsp?ftpID=5595&fileID= 5604

    Hi Barbara,
    For failed 13.1.2 update error U44M1P7, Please refer to the solution mentioned in the following threads :
    http://forums.adobe.com/message/5396792#5396792
    http://forums.adobe.com/message/5409050#5409050

  • I shop for for apps on my ipod touch and when i plug my ipod into itunes and it says erase and sync what does that mean?

    hello all,
    i normally shop on my ipod touch (because frankly i cant be bothered to plug it into itunes then shop! ) to shop for apps and song and etc. and because i have a wall charger in my room theres pratically no need to go the computer! so sometimes when im on the computer i want to use my ipod touch as well so i charge it on the pc.
    well to cut the story short everytime i want to shop on itunes it comes up with this note that says "your ipod is synced with a different pc etc" then it comes up with erase and sync? so my question is what does syn mean? because im worried if i choose ok it would get rid of all my apps
    - someone help me!

    - It means what it says.  Your iPod is synced with a different iTunes library.  To transfer purchases to this computer:
    iTunes Store: Transferring purchases from your iPhone, iPad, or iPod to a computer
    - If you want to make this computer your syncing computer see ths previous discussion:
    https://discussions.apple.com/thread/3362492?tstart=0

  • My MacBookPro has a white screen with a grey file folder in the center of the screen with a white question mark blinking in it. What does this mean?  And how can I get my computer back up and running normal?

    My MacBookPro has a white screen with a grey file folder in the center of the screen with a white question mark blinking in it. What does this mean?  And how can I get my computer back up and running normal?

    Start up in Safe Mode.
    http://support.apple.com/kb/PH14204?viewlocale=en_US
    Repair Disk.
    http://support.apple.com/kb/PH5836
    Reset PRAM.
       http://support.apple.com/kb/PH14222

  • HT1766 Hello I am trying to update my viber, as i pressed update icon the message appeared "This update is not available for this Apple ID either because it was bought by a different user or the item was refunded or camcelled" what does it mean

    Hello I am trying to update my viber, as i pressed update icon the message appeared "This update is not available for this Apple ID either because it was bought by a different user or the item was refunded or camcelled" what does it mean?

    iTunes issue ,Apple are working on it
    solutions in thids thread seem to resolve for some
    https://discussions.apple.com/message/25722716#25722716
    Appears to be linked to having changed iTunes Store Country at some time in past

  • I keep getting a message that pops up about every 15 minutes that says server connections interupted.  the internet works fine and is fast.  What does it mean?

    I recently installed a 2TB time capsule and everything works fine but keep getting a server connections interrupted.  What does that mean and how do I get rid of it.
    thanks
    john

    It means Apple have done a lousy job with Lion or ML and TC networking.
    Read this thread from the last post backwards.. there are a number of work arounds discussed.
    https://discussions.apple.com/thread/3526741?tstart=30
    not all work for all people everywhere.. some work sometimes for some people.

  • When trying to download Itunes this pops up " key not valid for use in specified state" what does this mean and how can I fix it?

    When trying to download Itunes this pops up " key not valid for use in specified state" what does this mean and how can I fix it? I am using a pc laptop if that makes any difference.

    Try reading through this thread: key not valid for use in specified state. Possible solution involves moving the RSA folder. Rather than deleting it as aniwack suggested I'd try this:
    For "Key not valid for use in specified state" errors try moving the folder RSA from C:\Users\<User>\AppData\Roaming\Microsoft\Crypto\RSA to say C:\RSA (just in case there should be a need to restore it) then try installing again. This folder appears to act as a cache and should be rebuilt automatically as required.
    tt2

  • TS4268 What does it mean 'This person cannot be reached by iMessage at this time'?

    I have iMessage to my friend successfully before.  But yesterday when I tried to iMessage him again, these words appear 'This person cannot be reached by iMessage at this time?  What does it mean?

    Thanks for this thread.  I had the problem too.  It was very frustrating because he's overseas and we iMessage a few times per week.
    The reason it was broken: the specific contact had changed his AppleID password and had not updated it on his iPhone. 
    The solution that worked for us:
    He reset his AppleID (c.f.: http://support.apple.com/kb/ht5624)
    He updated the password at iPhone (iOS7) >> Settings >> Messages
    He updated the password at iPhone >> Settings >> FaceTime
    I reset my network settings: my iPhone (iOS7) >> Settings >> General >> Reset >> Reset Network Settings
    He didn't have to reset his network settings, and neither of us powered our iPhones off/on.

  • Burning playlists from my iTunes to CD doesn't work anymore. Keep getting a "medium write error" message.  What does this mean?

    I'm trying to burn playlists onto a cd from itunes.  I keep getting a "medium write error" message.  What does this mean?  I heard that this may mean that I should try burning at a slower speed.  I tried this and that didn't help.  I also heard that I may need to use a different brand of CD-R disc.  I have not tried this yet.  I also heard that it could be a software issue or disc drive issue.  I recently updated my macbook pro software from tiger to snow leapord.  Do you think this could have affected my itunes playlist burning capabilities?  Thanks for the help.

    A system upgrade should not have affected anything. When did you notice the loss in functionality?
    Try different media.  2011 post on optical media - http://discussions.apple.com/thread.jspa?threadID=2754858&
    Apple Portables: Resetting the System Management Controller (SMC) - http://support.apple.com/kb/HT1411
    Realize that a MBP that came with Tiger is an old computer and optical drives do not last forever.
    You could try a drive cleaning disc to remove dust.  Don't be overly optimistic. I suspect it is an old drive issue.

  • I tried to download the latest OSX Mountain Lion and got this notice - "We could not complete your purchase.  The product distribution file could not be verified.  It may be damaged or was not signed. "  What does this mean and why can't I download it?

    I tried to download the latest OSX for my iMac - Mountain Lion.
    This is the message that I received:
    "We could not complete your purchase.  The product distribution file could not be verified.  It may be damaged or was not signed."
    What does this mean?

    The only thing that worked for me was to boot in safe mode.
    Power down.  Then press power button and hold 'shift' key until grey screen with progress bar appears... Once booted and logged in just open safari and browse to applestore. 
    No trouble at all once I did this.
    Reminder: create full backup before you upgrade OS
    Hope it helps.

  • When I start to download Firefox, I get a message that says "This type of file can harm your computer. Do yiu want to keep Firefox...p7.0.1.exe anyway? What does that mean and in what way can it harm my computer? Do I download it anyway?

    When I start to download Firefox, I get a message that says "This type of file can harm your computer. Do yiu want to keep Firefox...p7.0.1.exe anyway? What does that mean and in what way can it harm my computer? Do I download it anyway?

    You get that message any time you download an executable file. It is safe to open as long as you download from http://www.mozilla.org/en-US/firefox/new/

  • I have numerous downloads that say error 8328 what does this mean? This is ridiculous.

    How do I get rid of this error and what does it mean?

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • To be distributed set to Forbidden. What does it mean?

    Hi all,
    Under transaction SPRO select:  SAP Solution Manager -> Configuration -> Scenario-Specific Settings -> Service Desk -> Service Desk -> Status Profile -> Change Status Profile for User Status
    Double click on either SLFN0001 or ZLFN0001 if you have created it in your system.
    Double click on any Status Profile.
    At this point you will see the u201CChange Status Profile: Transaction Controlu201D screen.
    In the Transaction Control table under column u201CBusiness Transactionu201D there is a value called u201CTo be distributedu201D.  Anybody can explain in simple words what are the consequences of selecting the column u201CForbiddenu201D for this row (u201CTo be distributedu201D)?
    What does it mean to forbid the distributionu2026? I donu2019t understand.
    What the SAP help says about the u201Cforbiddenu201D column is u201CIndicator specifying that the business transaction cannot be carried out if this status is active.u201Du2026 but still this is not very clear to me.
    PLEASE HELP!!
    Brodo
    Edited by: Brodo Di Pollo on Oct 24, 2008 12:17 PM
    Edited by: Brodo Di Pollo on Oct 27, 2008 11:28 AM
    Edited by: Brodo Di Pollo on Oct 28, 2008 10:42 AM

    Hello Brodo,
    Refer to this thread:
    Re: Service Desk Message Status 'Further Statuses'
    Here you get to know what and why is the concept of distribution present in the solman system..
    Now, setting the status to forbidden means that the relevant service desk message cannot never be distributed to other systems like ( An R3 or SRM or any other SAP system )....
    Inspire ppl by rewarding !!
    Regards,
    Anand..

  • The procedure entry point Sqlite3_wal_checkpoint could not be located in the dynamic link library SQLite3.dll.   what does this mean?????

    the procedure entry point Sqlite3_wal_checkpoint could not be located in the dynamic link library SQLite3.dll.   what does this mean?????

    Hi Vas, I'll do my best.
    I don't think the current error message you're getting is related to the previous one.
    I have researched a little bit on the error message you're getting, and it seems to be one that has been going on for a few years, and from what I can see it relates to the iPod Photo cache folder.
    It also appears that the actual phone does sync even though you still get this message.
    I suggest you have a look at these webpages for further information
    https://discussions.apple.com/thread/2441003?start=0&tstart=0
    http://support.apple.com/kb/TS1314
    Good luck and let me know how you get on

  • What does this mean "We apologize for the inconvenience, but the ability to order books and prints is no longer supported in iPhoto 5. Please upgrade to a newer version of iPhoto to order these products.

    what does this mean "We apologize for the inconvenience, but the ability to order books and prints is no longer supported in iPhoto 5. Please upgrade to a newer version of iPhoto to order these products." I want to buy a photo book and that message keeps popping up.

    TD, LN - You guys make great points and I will take you at your word. Normally, I would not hesitate to update. I have a lot at stake here with a large vacation coming up with a great many new pictures anticipated. I don't know enough to understand what is meant by "verifying my library." Please give me some insight there and I will start the upgrade process tonight! Seriously, I have wanted to do this for some time, but have been scared away by reading too many situations on these forums.
    TD - you have a good sense of humor. I know all versions eventually need to be left to die away. Support is not eternal. I am sure I missed the announcement that certain versions of iPhoto would no longer offer the ability to conveniently make cards, calendars, books, etc. Like the original poster, I was surprised to learn my version did not offer that functionality only by requesting it and getting denied. Sort of frosted me at the time, as you can tell by my original reply here.
    If anyone can help me with the "verifying" question, I'll get off of here and let the original poster have his thread back! 

Maybe you are looking for