void (final PropertyChangeEvent e) { if(ANCESTOR_PROPERTY_NAME.equals(e.getPropertyName())){ final Component oldAncestor=(Component)e.getOldValue(); deinstall(oldAncestor); final Component newAncestor=(Component)e.getNewValue(); install(newAncestor); visibilityChanged(); }else{ throw new IllegalArgumentException("unknown propertyName: "+e.getPropertyName()); } }