/*
 * Code Listing 12-1  |  ShowWindow.java
 *     Chapter 12.2: Creating Windows
 *     (pg. 765)
*/

import javax.swing.JFrame;

/*
 * This program displays a simple window with a title. The
 * application exits when the user clicks the close button.
*/

public class ShowWindow
{
    public static void main(String[] args)
    {
        final int WINDOW_WIDTH  = 350;  // Window width in pixels
        final int WINDOW_HEIGHT = 250;  // Window height in pixels

        // Create a window.
        JFrame window = new JFrame();

        // Set the title.
        window.setTitle("A Simple Window");

        // Set the size of the window.
        window.setSize(WINDOW_WIDTH, WINDOW_HEIGHT);

        // Specify what happens when the close button is clicked.
        window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        // Display the window.
        window.setVisible(true);
    }
}

Add 'Module9/' and sub-directories. Add textbook code listing 12-1 in 'etc/src/'
Add 'Module9/' and sub-directories. Add textbook code listing 12-1 in 'etc/src/'
