public void setFullscreen(boolean fullscreen) {
		if (fullscreen) {
			GraphicsEnvironment.getLocalGraphicsEnvironment()
					.getDefaultScreenDevice().setFullScreenWindow(window);

		} else {
			GraphicsEnvironment.getLocalGraphicsEnvironment()
					.getDefaultScreenDevice().setFullScreenWindow(null);
			window.setLocationRelativeTo(null);
		}
		this.fullscreen = fullscreen;
	}