private void createModelToView(int rowCount){
  if (modelToView == null || modelToView.length != rowCount) {
    modelToView=new int[rowCount];
  }
}

private void createModelToView ( int rowCount ) { if ( modelToView == null || modelToView . length != rowCount ) { modelToView = new int [ rowCount ] ; } }
makes sure the modeltoview array is of size rowcount .
