public void renameNode(NodeComponent nc, String name) {  nodes.remove(nc); nc.setName(name);  nodes.add(nc); fireModification();
public void renameNode(NodeComponent nc, String name) throws IllegalArgumentException { if(nodeExists(name)) { throw new IllegalArgumentException("Node name already exists!"); } else { nodes.remove(nc); nc.setName(name); nodes.add(nc); fireModification(); }
  public void renameNode(NodeComponent nc, String name) {    // FIXME! This allows 2 Nodes with the same name!    nodes.remove(nc);    nc.setName(name);    //fireModification();    nodes.add(nc);    fireModification();  }