private static Component findByName(Container root,String componentName){
  if (verbose) {
    log("findByName(" + root + ", "+ componentName+ ")");
  }
  int count=root.getComponentCount();
  for (int iter=0; iter < count; iter++) {
    Component c=root.getComponentAt(iter);
    String n=c.getName();
    if (n != null && n.equals(componentName)) {
      return c;
    }
    if (c instanceof Container) {
      c=findByName((Container)c,componentName);
      if (c != null) {
        return c;
      }
    }
  }
  return null;
}

private static Component findByName ( Container root , String componentName ) { if ( verbose ) { log ( "findByName(" + root + ", " + componentName + ")" ) ; } int count = root . getComponentCount ( ) ; for ( int iter = 0 ; iter < count ; iter ++ ) { Component c = root . getComponentAt ( iter ) ; String n = c . getName ( ) ; if ( n != null && n . equals ( componentName ) ) { return c ; } if ( c instanceof Container ) { c = findByName ( ( Container ) c , componentName ) ; if ( c != null ) { return c ; } } } return null ; }
finds a component with the given name , works even with ui ' s that weren ' t created with the gui builder
