@Override public void actionPerformed(ActionEvent e) { List<?> data = selectedTable.getSelectedData(); for (Object object : data) { if (object instanceof SpellNode) { SpellNode node = (SpellNode) object; character.getSpellSupport().removeFromSpellBook(node, node.getRootNode().getName()); } } }