public static void fillTable(ResultSet aResult, JTable aTable) throws SQLException {
        ((DefaultTableModel) aTable.getModel()).setRowCount(0);
        ((DefaultTableModel) aTable.getModel()).setColumnCount(0);

        ResultSet results = aResult;
        ResultSetMetaData metadata = results.getMetaData();

        cols = metadata.getColumnCount();

        rowData = new Object[cols];
        colNames = new String[cols];

        for (int i = 0; i < cols; i++) {
            colNames[i] = metadata.getColumnName(i + 1);
        }
        for (int i = 0; i < cols; i++) {
            ((DefaultTableModel) aTable.getModel()).addColumn(colNames[i]);
        }

        while (results.next()) {
            for (int i = 0; i < cols; i++) {
                if (metadata.getColumnName(i + 1).equals("DateCreated")
                        || metadata.getColumnName(i + 1).equals("_dateModified")) {

                    rowData[i] = StrUtil.formatTimestamp(results.getTimestamp(i + 1));
                } else {
                    rowData[i] = results.getString(i + 1);
                }
            }
            ((DefaultTableModel) aTable.getModel()).addRow(rowData);
        }
    }