なぜこのようなコードを書く必要があるのかという簡単な質問があります
SwingUtilities.invokeLater(new Runnable(){
プログラムがそれなしで同じフレームを作成する場合は?
SwingUtilities を使用したコード
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
public class App {
    public static void main (String args[]){    
        SwingUtilities.invokeLater(new Runnable(){
            public void run() {
                JFrame frame = new JFrame("Hello world swing"); 
                frame.setVisible(true);
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                frame.setSize(300, 400);        
            }
        });
    }
}
スイングユーティリティなしのコード。
import javax.swing.JFrame;
public class App {
    public static void main (String args[]){    
        JFrame frame = new JFrame("Hello world swing");
        frame.setVisible(true);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(300, 400);
    }
}