/** Print the table content */ public void printTable() { for (int row = 0; row < dataTable.getRowCount(); ++row) { for (int col = 0; col < dataTable.getColumnCount(); ++col) { System.out.print("<>" + dataTable.getCell(row, col) + " "); } } }
/** * Check whether or not the cell exist * * @param value * @return true/false */ public boolean doesCellValueExist(String value) { for (int row = 0; row < dataTable.getRowCount(); ++row) { for (int col = 0; col < dataTable.getColumnCount(); col++) { if (value.equals(getCell(row, col))) { return true; } } } return false; }
/** @return the column count of the table */ public int getColumnCount() { return dataTable.getColumnCount(); }