JDialog dialogLocal = dialog; JInternalFrame iFrameLocal = iFrame;  if (dialogLocal != null) { dialogLocal.setVisible(false); ce = new ComponentEvent(dialogLocal, ComponentEvent.COMPONENT_HIDDEN); } else if (iFrameLocal != null) { iFrameLocal.setVisible(false); ce = new ComponentEvent(iFrameLocal, ComponentEvent.COMPONENT_HIDDEN);
if (display != null) { ce = display.kill();
    public void killWindow() {        ComponentEvent ce = null;        JDialog dialogLocal = dialog;        JInternalFrame iFrameLocal = iFrame;        if (dialogLocal != null) {            dialogLocal.setVisible(false);            ce = new ComponentEvent(dialogLocal, ComponentEvent.COMPONENT_HIDDEN);        } else if (iFrameLocal != null) {            iFrameLocal.setVisible(false);            ce = new ComponentEvent(iFrameLocal, ComponentEvent.COMPONENT_HIDDEN);        }        if (ce != null) {            componentHidden(ce);        }    }