private void addObjectIfNotFound(Object obj,Vector v){
  int n=v.size();
  boolean addIt=true;
  for (int i=0; i < n; i++) {
    if (v.elementAt(i) == obj) {
      addIt=false;
      break;
    }
  }
  if (addIt) {
    v.addElement(obj);
  }
}

private void addObjectIfNotFound ( Object obj , Vector v ) { int n = v . size ( ) ; boolean addIt = true ; for ( int i = 0 ; i < n ; i ++ ) { if ( v . elementAt ( i ) == obj ) { addIt = false ; break ; } } if ( addIt ) { v . addElement ( obj ) ; } }
add object to vector if not already there .
