Clear JTable Rows Java

DefaultTableModel model = (DefaultTableModel) table.getModel();
model.setRowCount(0);
model.setColumnCount(0);
DIOR27