Java JTable Row removeTableRows(DefaultTableModel model)

Here you can find the source of removeTableRows(DefaultTableModel model)

Description

remove Table Rows

License

Open Source License

Declaration

public static void removeTableRows(DefaultTableModel model) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.table.DefaultTableModel;

public class Main {
    public static void removeTableRows(DefaultTableModel model) {
        if (model == null) {
            return;
        }/*from w w  w  .  j  a v  a2  s  .co  m*/
        int rows = model.getRowCount();
        for (int i = rows - 1; i >= 0; i--) {
            model.removeRow(i);
        }
    }
}

Related

  1. isFirstToLastRow(TableModelEvent e)
  2. isRowInsert(TableModelEvent e)
  3. jtable$convertRowIndexToModel(JTable table, int index)
  4. makeIntoMoveRowUpButton(final JTable table, JButton button)
  5. packRows(JTable table, int start, int end, int margin)
  6. rowToModelIndex(JTable table, int row)
  7. setRowLines(JTable table, int row, int lines)
  8. setTableSize(JTable table, float percentage, int rows)
  9. setToRowBackground(Component c, JTable table, int row)