/** This method uninstalls listeners installed by the UI. */ protected void uninstallListeners() { if (toolBarFocusListener != null) { int count = toolBar.getComponentCount(); for (int i = 0; i < count; i++) toolBar.getComponent(i).removeFocusListener(toolBarFocusListener); toolBarFocusListener = null; } floatFrame.removeWindowListener(windowListener); windowListener = null; toolBar.removeContainerListener(toolBarContListener); toolBarContListener = null; toolBar.removeMouseMotionListener(dockingListener); toolBar.removeMouseListener(dockingListener); dockingListener = null; }