working with invokeAndWait in Swing java

Tutorials Shared by the Internet Community

Advertisements


Synopsis

problem with Swing is that its not thread safe, you can not update Swing GUI component from any thread , which makes life of swing GUI developer quite

Statistics

  • Total Hits - 18199

  • Total Votes - 113 votes

  • Vote Up - 49 votes

  • Vote Down - 64 votes

  • Domain - javarevisited.blogspot.com

  • Category - JAVA/Swing

  • Submitted By - Javin Paul

  • Submitted on - 2011-09-24 12:10:39

Description

problem with Swing is that its not thread safe, you can not update Swing GUI component from any thread , which makes life of swing GUI developer quite difficult while programming concurrent applications which involves multiple threads. SwingUtilities provides solution of this problem by introducing two utility method called invokeAndWait and invokeLater, which allows you to update GUI from any thread in thread-safe manner by requesting Event dispatcher thread to do the update. ...


Site  |   Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements