Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why isn't swing thread safe?

945680Jul 2 2012 — edited Jul 6 2012
I'm not that experienced with threading or synchronization but if I wanted to synchronize a bunch of swing objects, is there a way you could do it in such a way that you could still have very long use and not have your program not work when a newer version of java comes out? (Maybe I'm misunderstanding the threading warning on all the swing API classes.)

Could you synchronize, if needed, a bunch of Canvas subclass objects or something so that they wouldn't collide?

Say you had a game with bird objects flying around, but you didn't want them to cross paths and collide at any time (unless you're making Angry Birds or something, ha ha ha), but you know what I mean, where it wouldn't be cool to have component objects collide.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 3 2012
Added on Jul 2 2012
12 comments
682 views