desktopFrame.dispose(); desktopFrame = null;
if(desktopFrame != null) {  desktopFrame.dispose(); desktopFrame = null; }
    protected void onClose() {        log.debug("onClose");        // Stop the repaint manager        if (repaintManager != null) {            repaintManager.shutdown();            repaintManager = null;        }        // Close the desktop        desktopFrame.dispose();        desktopFrame = null;    }