private void removeAnimal(int index) {
        if (index < animals.size() && index >= 0) {
            //System.out.println("Removing row " + index);
            animals.remove(index);
            animalCount --;

            if (index == mother) {
                mother = -1;
            } else if (index < mother) {
                mother--;
            }

            if (index == father) {
                father = -1;
            } else if (index < father) {
                father--;
            }

            removeRow(index);

            for (; index < animalCount; index++) {
                int oldNumber = Integer.parseInt((String) tableModel.getValueAt(index, 0));
                tableModel.setValueAt(String.valueOf(oldNumber - 1), index, 0);
            }

            table.revalidate();
            repaint();
        }
    }