import javax.swing.JFrame; public class Main extends JFrame { public static void main(String[] args) { new Main(); } public Main() { this.setSize(200, 100); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setTitle("Hello World!"); this.setVisible(true); } }