(String)ComboDialog.showDialog(this, "Binder", new Vector(sortedNames));
(String)ComboDialog.showDialog(this, "Select Binder or Enter New Name", new Vector(sortedNames));
  private void addBinder() {    Enumeration components = componentToNode.keys();    ArrayList binderNames = new ArrayList();    ArrayList binderClasses = new ArrayList();    while (components.hasMoreElements()) {      Object o = components.nextElement();      if (o instanceof BinderComponent) {        BinderComponent binder = (BinderComponent)o;        String name = ((BaseComponent)binder).getShortName();        // if name is prefixed with an agentname|, strip it off        int index = name.indexOf('|');        if (index != -1)          name = name.substring(index+1);        if (!binderNames.contains(name)) {          binderNames.add(name);          binderClasses.add(binder.getComponentClassName());        }      }    }    ArrayList sortedNames = (ArrayList)binderNames.clone();    Collections.sort(sortedNames);    String name =       (String)ComboDialog.showDialog(this, "Binder", new Vector(sortedNames));    if (name == null)      return;    name = name.trim();    if (name.length() == 0)      return;    String className = null;    int index = binderNames.indexOf(name);    if (index > -1 && index < binderNames.size())      className = (String)binderClasses.get(index);    else {      className =       (String)JOptionPane.showInputDialog(this, "Enter Binder Full Class",                                          "Binder Class",                                          JOptionPane.QUESTION_MESSAGE,                                          null, null, className);      if (className == null) return;      className = className.trim(); // trim white space      if (className.length() == 0) return;    }    BinderComponent binder = new BinderBase(name, className, null);    addBaseComponent(binder);    binder.setComponentType(ComponentData.AGENTBINDER);  }