/**
 * 
 */
package fr.univartois.bomberman.view;

import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.WindowConstants;

/**
 * @class Window 
 * @author thibault
 * 
 */
public class Window extends JFrame {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1459275138805807700L;
	
	public final static int WIDTH = 1450;  
	public final static int HEIGHT =  820; 
	
	public Window() {
		super("BomberStudent");
		setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
		
		setSize(WIDTH, HEIGHT);
		setPanel(new MenuView(this));
		setVisible(true);
	}
	/**
	 * Change the current view
	 * @param view 
	 */
	public void setPanel(JComponent view) {
		setContentPane(view);
		view.setRequestFocusEnabled(true);
		view.setFocusable(true);
		view.requestFocus(true);
		revalidate();
		repaint();
	}
}
