List of usage examples for javax.swing.table AbstractTableModel getRowCount
public int getRowCount();
From source file:com.peadargrant.filecheck.web.reports.WebTableTransformer.java
public List getTableContents(AbstractTableModel model) { int nRows = model.getRowCount(); int nCols = model.getColumnCount(); List<List> rows = new ArrayList<>(); for (int iRow = 0; iRow < nRows; iRow++) { List<Object> row = new ArrayList<>(); for (int iCol = 0; iCol < nCols; iCol++) { Object output = model.getValueAt(iRow, iCol); if (String.class.isInstance(output)) { output = HtmlUtils.htmlEscape((String) output); }//from www . java 2 s .c o m row.add(output); } rows.add(row); } return rows; }