The main reason for starting the application this way is that Swing components are not thread safe, so you need to guarantee which thread your graphical interface will start working with: the one called Event Dispatching Thread ( EDT ). Without doing this, you cannot be sure which stream it will start in, but, as several good commentators have noted, the main stream is guaranteed not to be EDT.
You must create, modify, or modify user interface components from the EDT. Failure to do so will result in unexpected behavior (if you're lucky) and / or dirty reviews.
Some resources that I suggest you familiarize yourself with:
You can also read. Why is my JFrame template Java application using EventQueue.invokeLater in the main method?
UPDATE
This is a blog I tried to find: P
It basically explains why it is important to synchronize your main with EDT before you start, and also describes some details about why.
It also describes why many developers make this fundamental mistake when launching their applications (basically we were told that we could, but we were never allowed ... we feel bad)
Madprogrammer
source share