/** Frees resources, clears references */ public void dispose() { if (tempFloatingTimer != null) { tempFloatingTimer.stop(); } if (initialized) { if (winListener != null) removeListener(winListener); if (cmpListener != null) c.removeComponentListener(cmpListener); wh.removeWindow(this, null); // AbstractApplication.getApplication().addComponent( getClass().getName(), null ); if (borrowMenuBar) { borrowMenuBar(null); wh.removeBorrowListener(this); } if (wh.getMenuBarBorrower() == this) wh.setMenuBarBorrower(null); if (ownMenuBar) { setJMenuBar(null); wh.getMenuBarRoot().destroy(this); } } if (w != null) { w.dispose(); } else if (jif != null) { jif.dispose(); } if (ggTitle != null) ggTitle.dispose(); classPrefs = null; cmpListener = null; winListener = null; }