Here you can find the source of deleteAllRows(JTable table)
public static void deleteAllRows(JTable table)
//package com.java2s; //License from project: Apache License import javax.swing.*; import javax.swing.table.*; public class Main { public static void deleteAllRows(JTable table) { DefaultTableModel defaultTableModel = (DefaultTableModel) table .getModel();//from w w w . j av a 2 s .co m defaultTableModel.setRowCount(0); } }