import java.awt.*;
import javax.swing.*;

import gui.JListEditor;
import usinggui.Editor;


/**
 * An example that uses internal windows
 *
 * @author  Prof. David Bernstein, James Madison University
 * @version 1.0
 */
public class InternalWindowDriver
{

    /**
     * The entry point
     *
     * @param args   The command line arguments
     */
    public static void main(String[] args)
    {
	JFrame            f;
	Container         contentPane;
	JInternalFrame    i1, i2, i3;
	JDesktopPane      desk;


	f = new JFrame();
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.setSize(600,400);        

	desk = new JDesktopPane();
	desk.setSize(600,400);

	    i1 = new JInternalFrame("Action/Adventure", 
				    true, true, true, true);
	    i1.setSize(200,100);
	    i1.setBounds(0,0,200,100);
	    i1.getContentPane().add(new Editor());
	    i1.setVisible(true);

	    i2 = new JInternalFrame("Comedy", 
				    true, true, true, true);
	    i2.setSize(200,100);
	    i2.setBounds(200,100,200,100);
	    i2.getContentPane().add(new JListEditor());
	    i2.setVisible(true);
	    

	    i3 = new JInternalFrame("Romance", 
				    true, true, true, true);
	    i3.setSize(200,100);
	    i3.setBounds(400,200,200,100);
	    i3.getContentPane().add(new JButton("Click me"));
	    i3.setVisible(true);

	    desk.add(i1);
	    desk.add(i2);
	    desk.add(i3);

	f.setContentPane(desk);

	f.setVisible(true);
    }
}

