Why should I use Swing Utilities and how to use it?

This mainly concerns my question here , but I do not understand why Swing Utilities is needed and what it is used for. I am developing a swing gui and I do not want to miss out on all that Swing Utilities has to offer. Also someone can explain what the method does invokeLaterand how it works.

+3
source share
1 answer

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 .

+6
source

All Articles