private void performFadeOut(){
  if (!translucencySupported) {
    close();
  }
 else {
    float opacity=window.getOpacity();
    if (opacity < 0.1) {
      close();
    }
 else {
      setOpacity(opacity - 0.05f);
    }
  }
}

private void performFadeOut ( ) { if ( ! translucencySupported ) { close ( ) ; } else { float opacity = window . getOpacity ( ) ; if ( opacity < 0.1 ) { close ( ) ; } else { setOpacity ( opacity - 0.05f ) ; } } }
lower the opacity by a bit or close the window if opacity is low enough .
