void (JBTable table, PackageEntryTable list) { int selected = table.getSelectedRow(); if (selected < 0) return; TableUtil.stopEditing(table); list.removeEntryAt(selected); AbstractTableModel model = (AbstractTableModel)table.getModel(); model.fireTableRowsDeleted(selected, selected); if (selected >= list.getEntryCount()) { selected--; } if (selected >= 0) { table.setRowSelectionInterval(selected, selected); } }