public void setFieldNames(String[] newFieldNames)
    {
        boolean changed = false;
        if (_fieldNames == null)
            changed = true;
        else if (newFieldNames.length != _fieldNames.length)
            changed = true;

        if (newFieldNames.length > _headerRenderers.size())
            _headerRenderers.setSize(newFieldNames.length);

        for (int i = 0; !changed && (i < _fieldNames.length); i++)
        {
            if (!_fieldNames[i].equals(newFieldNames[i]))
            {
                changed = true;
            }
        }

        _fieldNames = newFieldNames;

        if (changed)
            fireTableStructureChanged();

        // model also serves as header renderer
        for (int i = 0; i < newFieldNames.length; i++)
            _table.getColumnModel().getColumn(i).setHeaderRenderer(this);

        resizeColumns();
    }