import javax.swing.*;
import java.awt.*;

/**
 * A window that displays a game.
 *
 * @author Jim Glenn
 * @version 0.1 from LiberationApplet of 1/8/2009
 */

public class PeanutsWindow extends JFrame
{
    public PeanutsWindow()
    {
	super("Pick up the Peanuts 2K9");

	PeanutsModel model = new PeanutsModel();
	GameView view = new GameView(model);
	PeanutsControl control = new PeanutsControl(model);
	view.addKeyListener(control);

	getContentPane().setLayout(new BorderLayout());
	getContentPane().add(view, BorderLayout.CENTER);
    }

    
    public static void main(String[] args)
    {
	JFrame win = new PeanutsWindow();
	win.setSize(600, 600);
	win.setVisible(true);
	win.setDefaultCloseOperation(EXIT_ON_CLOSE);
    }
}

	

