private void createViewToModel(int rowCount){
  int recreateFrom=0;
  if (viewToModel != null) {
    recreateFrom=Math.min(rowCount,viewToModel.length);
    if (viewToModel.length != rowCount) {
      Row[] oldViewToModel=viewToModel;
      viewToModel=new Row[rowCount];
      System.arraycopy(oldViewToModel,0,viewToModel,0,recreateFrom);
    }
  }
 else {
    viewToModel=new Row[rowCount];
  }
  int i;
  for (i=0; i < recreateFrom; i++) {
    viewToModel[i].modelIndex=i;
  }
  for (i=recreateFrom; i < rowCount; i++) {
    viewToModel[i]=new Row(this,i);
  }
}

private void createViewToModel ( int rowCount ) { int recreateFrom = 0 ; if ( viewToModel != null ) { recreateFrom = Math . min ( rowCount , viewToModel . length ) ; if ( viewToModel . length != rowCount ) { Row [ ] oldViewToModel = viewToModel ; viewToModel = new Row [ rowCount ] ; System . arraycopy ( oldViewToModel , 0 , viewToModel , 0 , recreateFrom ) ; } } else { viewToModel = new Row [ rowCount ] ; } int i ; for ( i = 0 ; i < recreateFrom ; i ++ ) { viewToModel [ i ] . modelIndex = i ; } for ( i = recreateFrom ; i < rowCount ; i ++ ) { viewToModel [ i ] = new Row ( this , i ) ; } }
resets the viewtomodel array to be of size rowcount .
