void (AnActionButton anActionButton) { String selectedValue = getSelectedAnnotation(); if (selectedValue == null) return; myCombo.removeItem(selectedValue); int rowIndex = -1; for (int i = 0; i < myTableModel.getDataVector().size(); i++) { if (myTableModel.getDataVector().get(i).contains(selectedValue)) { rowIndex = i; break; } } if (rowIndex != -1) myTableModel.removeRow(rowIndex); }