Alex Rivera | Logout

What does SwingUtilities.invokeLater do?

Asked 2011-07-04T06:08:41.420
58

What does SwingUtilities.invokeLater do? Is it just delaying the execution of a block of codes inside its run method? What is the difference between calling an action within the invokeLater function or simply calling it at the end of the thread we want to be executed? Can anyone help me with what really does the invokeLater function do?

Edit
Report

1 Answer

1

Note that you eventually get a call to your doRun.run( ) method for every time you call invokeLater(doRun). So if you call it ten times before the event thread gets an opportunity to perform its processing, you are likely to then get ten successive calls to doRun.run( ).

answered 2012-12-03T15:32:03.560

Your Answer