As indicated in the API , this SwingUtilitiesis a set of utility methods for Swing. In this case, you need to make sure that the Swing components are created / modified in the Thread Dispatch Thread or EDT. In addition, as indicated in the API , it is invokeLaterused when the application thread needs to update the GUI.
You can also read Concurrency in Swing . Also, a more detailed explanation of invokeLater .
source
share