private void buildFrame(GameEngine engine)
	{
		currentPanel=new JPanel();
		currentPanel.setPreferredSize(engine.view().getSize());
		currentPanel.setLayout(new BorderLayout());
		
		currentPanel.add(engine.view(),BorderLayout.CENTER);
		Container c=getContentPane();
		c.setLayout(new BorderLayout());
		c.add(currentPanel,BorderLayout.CENTER);
		
		currentPanel.requestFocusInWindow();
		
		pack();
		setVisible(true);
		
		Dimension size = Toolkit.getDefaultToolkit().getScreenSize();
		this.setLocation(size.width/2-this.getWidth()/2, size.height/2-this.getHeight()/2);
	}