Here you can find the source of delSelectedRows(JTable table)
@Deprecated public static void delSelectedRows(JTable table)
//package com.java2s; //License from project: Apache License import javax.swing.*; import javax.swing.table.DefaultTableModel; public class Main { @Deprecated public static void delSelectedRows(JTable table) { DefaultTableModel model = (DefaultTableModel) table.getModel(); if (model == null) return; int selectedColumnCount = table.getSelectedRowCount(); for (int i = 0; i < selectedColumnCount; i++) { model.removeRow(table.getSelectedRow()); }// w ww .j a va 2s. c o m } }