import javax.swing.*;    // all of the Swing objects
import java.awt.*;       // more windowing components, including Container
import java.io.*;

public class lab3starter {
    
    /**
     * A static helper function to initialize and show the user interface!
     **/
    private static void initAndShowGUI() {
	// A JFrame is a window.
	JFrame myFrame = new JFrame();

	// The content pane is the meat of the window -- the window minus
	// any menubars, titlebar, close/minimize/maximize buttons, etc.
	Container contentPane = myFrame.getContentPane();

	// We need to set how we want our content pane to lay out the 
	// objects we add to it.  For now, we'll use a FlowLayout, which
	// places objects left-to-right in a line.  (See the javadocs.)
	contentPane.setLayout(new FlowLayout());

	// Now we can add any Swing components we like:
	contentPane.add(new JButton());
	contentPane.add(new JButton("A Better Button?"));
	contentPane.add(new JButton("3"));

	// pack() and setVisible() need to be called to realize and display 
	// the window.  If you're using an older JDK, you may need to use
	// show() instead of setVisible(true).
	myFrame.pack();
	myFrame.setVisible(true);
    }


    /**
     * The main entry-point of our program.
     **/
    public static void main(String args[]) {
        // Call the function that sets up and displays the user-interface.
        // (We do this extra stuff to make sure that Swing won't hang!)
        SwingUtilities.invokeLater(
          new Runnable() { public void run() { initAndShowGUI(); } }
        );
    }
}



