/* GUI02.java CIS 160 David Klick 2011-09-24 Restructuring so multiple windows can be created */ import javax.swing.JFrame; import javax.swing.SwingUtilities; public class GUI02 { public GUI02() { SwingUtilities.invokeLater(new Runnable() { public void run() { createAndShowGUI(); } }); } private void createAndShowGUI() { JFrame fra = new JFrame("First GUI Test"); fra.setSize(300, 200); fra.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); fra.setVisible(true); } public static void main(String[] args) { GUI02 app1 = new GUI02(); GUI02 app2 = new GUI02(); GUI02 app3 = new GUI02(); } }