public int findColumn(String columnName){
  for (int i=0; i < m_fields.size(); i++) {
    GridField field=(GridField)m_fields.get(i);
    if (columnName.equals(field.getColumnName()))     return i;
  }
  return -1;
}

public int findColumn ( String columnName ) { for ( int i = 0 ; i < m_fields . size ( ) ; i ++ ) { GridField field = ( GridField ) m_fields . get ( i ) ; if ( columnName . equals ( field . getColumnName ( ) ) ) return i ; } return - 1 ; }
returns a column given its name .
