public void ancestorRemoved(AncestorEvent event) {// 2005/12/08
				KeyboardFocusManager.getCurrentKeyboardFocusManager()
						.removePropertyChangeListener("focusOwner",
								focusHandler); // 2006/12/19

				if (event == null || event.getAncestorParent() == null) {
					// 2006/12/01 protection againts NPE
					return;
				} else {
					Window w = SwingUtilities.getWindowAncestor(event
							.getAncestorParent());
					if (w != null) { // 2007/03/07 hope it helps with desktops
										// on JDialogs
						w.removeWindowListener(windowListener);
						if (floatingContainerFollowParentWindow) {
							w.removeComponentListener(windowMovementListener);
						}
					}

				}
			}