tag:blogger.com,1999:blog-8712770457197348465.post8345936409638384871..comments2024-03-28T02:47:19.159-07:00Comments on Javarevisited: InvokeLater and InvokeAndWait in Java Swing (an example tutorial)javin paulhttp://www.blogger.com/profile/15028902221295732276noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-8712770457197348465.post-57023437647182623222014-04-10T04:31:11.765-07:002014-04-10T04:31:11.765-07:00what about synchronous and asynchronous in java?what about synchronous and asynchronous in java?Anonymoushttps://www.blogger.com/profile/04105926386894254393noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-1792291668748935182012-01-06T04:30:53.321-08:002012-01-06T04:30:53.321-08:00Hi Steve, thanks for pointing this nice little Got...Hi Steve, thanks for pointing this nice little Gotcha about AWT Shutdown thread, though I have not experienced it yet but worth trying.Javin @ java final keyword examplehttp://javarevisited.blogspot.com/2011/12/final-variable-method-class-java.htmlnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-1489700430647197302012-01-05T16:07:58.478-08:002012-01-05T16:07:58.478-08:00One other point to note about invokeLater is that ...One other point to note about invokeLater is that if you are calling it from a thread that gets processed on sub-second intervals you application will never terminate this is because the AWT Shutdown thread is kicked off every second and only terminates all the helper threads if there is nothing in the event queue. If you are calling invokeLater sub-second the event queue always has something in Steve Webbhttps://www.blogger.com/profile/08854697133772426439noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-50174801520911286652011-11-23T19:31:36.488-08:002011-11-23T19:31:36.488-08:00This very same question difference between invokeA...This very same question difference between invokeAndWait and invokeLater is asked to me in a recent interview. there was also lots of followup in terms of blocking and how invokeAndWait achieves blocking etc.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-13889493594792230222011-09-14T22:02:41.479-07:002011-09-14T22:02:41.479-07:00InvokeAndWait and InvokeLater is also defined in E...InvokeAndWait and InvokeLater is also defined in EventQueue class and you should use directly from EventQueue instead of SwingUtilities. These two were part of SwingUtilities because first version of swing API had to work with JDK 1.1. even after now Swing is part of JDK they have remaining in SwingUtilities also.Anonymousnoreply@blogger.com