}
public static DefaultTable copyTable(ITable other) {
try {
ITableMetaData tableMetaData = other.getTableMetaData();
DefaultTable result = new DefaultTable(tableMetaData);
Column[] columns = tableMetaData.getColumns();
for (int i = 0; i < other.getRowCount(); i++) {
Object[] row = new Object[columns.length];
for (int j = 0; j < columns.length; j++) {
row[j] = other.getValue(i, columns[j].getColumnName());
}
result.addRow(row);
}
return result;
}
catch (DataSetException ex) {
throw new RuntimeException(ex);