if( propRelations != null && count != propRelations.length ) { for(int i=0; i < propRelations.length; i++) { removeProperty(propRelations[i]); } }    if( propRoles != null && count != propRoles.length ) { for(int i=0; i < propRoles.length; i++) { removeProperty(propRoles[i]); } }
  private void updateRelationCount(Integer newCount) {    int count = newCount.intValue();    propRelations = new Property[count];    propRoles = new Property[count];    // Note: If you feel you want to change the name of these    // properties, see the "Hack Note" above.    for(int i=0; i < count; i++) {      propRelations[i] = addAgentQueryProperty("Relationship " + (i+1), "");      ((Property)propRelations[i]).setToolTip("Value for Relationship " + (i+1));      propRoles[i] = addProperty("Role " + (i+1), "");      ((Property)propRoles[i]).setToolTip("Value for Role " + (i+1));    }        }