BufferStrategy

Hi there.

I use the following code for entering fullscreen mode via visible=true and exiting the game with visible=false
My problem is, that it doesn’t exit but rather leaves a white screen that doesn’t react to anything else than killing it with the taskmanager from windows.
Any suggestions on how to solve this ?

public void showMe(boolean visible) {
		if(visible){
			setIgnoreRepaint(true);
			setUndecorated(true);
			device.setFullScreenWindow(this);
			int depth = device.getDisplayMode().getBitDepth();
			int refresh = device.getDisplayMode().getRefreshRate();
			Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
			gg.setFrameSize(d);
			try{
				device.setDisplayMode(new DisplayMode(d.width, d.height, depth, refresh));
				createBufferStrategy(numJavaFullScreenBuffers);
				bufferStrategy = getBufferStrategy();
			}catch(Exception e){
				e.printStackTrace();
			}
			requestFocus();
		}else{
			device.setFullScreenWindow(null);
			setVisible(false);
                        System.exit(0);
		}
	}

Thanks for any help, I appreciate it.