Java JTable Row Delete deleteAllRows(JTable table)

Here you can find the source of deleteAllRows(JTable table)

Description

delete All Rows

License

Apache License

Declaration

public static void deleteAllRows(JTable table) 

Method Source Code

//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);
    }
}

Related

  1. deleteSelectedRows(JTable table)
  2. delSelectedRows(JTable table)
  3. removeAllRows(JTable table)
  4. removeAllRows(JTable table)