public void setFullscreen(boolean fill) {
		
		new_display = getBestDisplayMode();
		
		if(device.isFullScreenSupported() && new_display != null) {
			try {
				device.setFullScreenWindow(this);
				//this.setUndecorated(true);
				this.setIgnoreRepaint(true);
				this.setResizable(false);
				if(device.isDisplayChangeSupported()) {device.setDisplayMode(new_display);}
				
			} finally {
				if(!fill) {
					device.setFullScreenWindow(null);
					//this.setUndecorated(false);
					this.setIgnoreRepaint(false);
					this.setResizable(true);
					if(device.isDisplayChangeSupported()) {device.setDisplayMode(old_display);}
				}
			}
		}
		
	}