Here you can find the source of contains(int row, TableModel model)
protected static boolean contains(int row, TableModel model)
//package com.java2s; //License from project: Open Source License import javax.swing.table.TableModel; public class Main { protected static boolean contains(int row, TableModel model) /* */{/*from w ww. j a v a2 s .co m*/ /* 102 */if (model == null) { /* 103 */return false; /* */} /* 105 */if (row < 0) { /* 106 */return false; /* */} /* */ /* 109 */return row < model.getRowCount(); /* */} }