@Override
    public final void update(final Observable o, final Object arg) {
        final HashMap<Program, Integer> unsorted =
            new HashMap<Program, Integer>();

        final Vector<Entity> entities = new Vector<Entity>(field.getEntities());
        for (final Entity entity : entities) {
            final Program program = entity.getProgram();
            int amount = 1;
            if (unsorted.containsKey(program)) {
                amount += unsorted.get(program);
            }
            unsorted.put(program, amount);
        }

        final Vector<Entry<Program, Integer>> sorted =
            new Vector<Map.Entry<Program, Integer>>(unsorted.entrySet());
        Collections.sort(sorted, this);

        data = sorted;
        for (final TableModelListener l : listener) {
            l.tableChanged(new TableModelEvent(this));
        }
    }