Everything Swing related is done on the EDT, or Event Dispatching Thread. Painting, event handling, gui updating, etc. This keeps things organized, as making changes to the GUI from multiple Threads can result in pandemonium.
So, if you're doing something on another Thread and you want to make a change to the gui, you should do it on the EDT. You do that by calling invokeLater() or invokeAndWait().
And since technically the main Thread (the Thread that invokes the main method) is a separate Thread, it's a good practice to use invokeLater() or invokeAndWait() to make gui changes, including creating and showing a JFrame.