Catching Window events

Hi,



Im creating a JMonkey window using



display = DisplaySystem.getDisplaySystem( properties.getRenderer() );

display.setMinDepthBits( depthBits );
display.setMinStencilBits( stencilBits );
display.setMinAlphaBits( alphaBits );
display.setMinSamples( samples );

display.createWindow( this.overrideWidth, this.overrideHeight, properties.getDepth(), properties.getFreq(), false );



Is there anyways I can catch the mouse enter/exit events, or the event when the X in the top corner is pressed?

Alex

AbstractGame.cleanup() gets called when the window closes but not sure about mouse exit/enter