The Source for Java Technology Collaboration

Home » java.net Forums » Project Looking Glass 3D » Wonderland & MPK20 Interest

Thread: Warning about accessing Swing or AWT objects from inside a commit

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 0
deronj

Posts: 811
Warning about accessing Swing or AWT objects from inside a commit
Posted: Jun 29, 2009 2:08 PM
  Click to reply to this thread Reply

If you are a Wonderland 0.5 developer who uses the App Base, you should be aware that if you try to access a Swing or AWT object from inside a Processor commit method or an EventListener commitEvent method, a deadlock can result. For example, if you try to make a WindowSwing visible from inside a commitEvent or even create an AWT mouse event, the client can deadlock.

To avoid this, you should use SwingUtilities.invokeLater to invoke the Swing or AWT object access off the render thread.

This will eventually be documented in the Wonderland 0.5 Swing Developer's guide.




 XML java.net RSS