public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
            boolean hasFocus, int row, int column)
    {
        if (!_pendingRics.isEmpty())
            createRenderers();

        // column is index of table view, not of table model.
        // Must use JTable.getColumnName(int) instead of
        // TableModel.getColumnName(int)
        JComponent c = null;
        if (row != -1)
        {
            synchronized (this)
            {
                RecordRenderer rr = (RecordRenderer)_recordRows.elementAt(row);
                c = rr.fieldRenderer(table.getColumnName(column));
            }
        }
        else
        // header
        {
            // for some reason, when moving columns value of column
            // is incremented by one. For now, just prevent the
            // array out of bounds exception. Operation will perform
            // correctly anyway.
            if (column >= getColumnCount())
                column = getColumnCount() - 1;
            c = (JComponent)_headerRenderers.elementAt(column);
        }
        if (c == null)
        {
            // Create dummy renderer
            if (value == "XX")
                c = _emptyLabel;
            else
                c = new JLabel((String)value);
            c.setForeground(Color.black);

            // cache the header renderer
            if (row == -1)
                _headerRenderers.setElementAt(c, column);
        }
        if (row == -1)
        {
            ((JLabel)c).setText((String)value);
            c.setBorder(new BevelBorder(BevelBorder.RAISED));
        }
        else
        {
            if (isSelected)
                c.setBackground(table.getSelectionBackground());
            else
                c.setBackground(table.getBackground());
        }
        return c;
    }