Display a GUI window. The window need not have any contents, but should respond to requests to be closed.

import javax.swing.JFrame;
 
public class Main {
     public static void main(String[] args) throws Exception {
         JFrame w = new JFrame("Title");
         w.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         w.setSize(800,600);
         w.setVisible(true);
     }
}