// Basic2 GUI // Demonstrating another place to put the code for GUI import javax.swing.*; public class Basic2 { public static void main(String[] args) { new MyGUI(); } } class MyGUI { { JFrame f = new JFrame("Basic Test2!"); f.setSize(500,500); f.setVisible(true); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } }