日期:2014-05-20 浏览次数:20997 次
private String[] columnNames = {"名称", "页数"};
private Object[][] data = {
{"KathySmithSnowboarding", new Integer(5)},
{"DoGFGFhnDoeRowing", new Integer(0)},
{"TUHJohnDoeRowing", new Integer(7)},
{"OPKJJohnDoeRowing", new Integer(0)},}
private void TranceData() {
int RowsCount = 0, numRows = tb.getRowCount(),numCols=tb.getColumnCount();
Object tmp[][] = new Object[numRows][numCols];
for (int i = 0; i < numRows; i++) {
for (int j = 0; j < numCols; j++) {
tmp[i][j] = tb.getValueAt(i, j);
System.out.print("|"+tmp[i][j]);
}
}
for (int i = 0; i < numRows; i++) {
if (tb.getValueAt(i, 1) != "0") {
RowsCount++;
}
}
Object[] objs = new Object[RowsCount];
for (int j = 0; j < RowsCount; j++) {
Map maps = new HashMap();
maps.put("内容", );
maps.put("页数", );
objs[j] = maps;
}