if (dialog != null) { dialog.removeComponentListener(this); dialog.dispose(); dialog = null; } else if (iFrame != null) { iFrame.removeComponentListener(this); iFrame.dispose(); iFrame = null;
if (display != null) { WSDisplay wsd = display; setDisplay(null); wsd.dispose();
    protected void cleanUp() {        if (dialog != null) {            dialog.removeComponentListener(this);            dialog.dispose();            dialog = null;        } else if (iFrame != null) {            iFrame.removeComponentListener(this);            iFrame.dispose();            iFrame = null;        }        if (content instanceof ComponentListener) {            removeComponentListener((ComponentListener) content);        }    }