Java tutorial
//package com.java2s; import javax.swing.*; import javax.swing.table.DefaultTableModel; public class Main { public static void table_clean(JTable table) { DefaultTableModel tableModel = (DefaultTableModel) table.getModel(); tableModel.setRowCount(0); } }