Imagem em uma coluna de JTable

Alguém sabe como incluo uma imagem em um JTable?

Atenciosamente,
Samuel Cunha

Tenta criar uma instancia de DefaultTableModel primeiro!!
Depois utiliza a JTable com esse objecto.
de seguida setHeaderRenderer da coluna que queres com uma instancia do objecto TABLERENDERER!!!

Eu utilizo em várias aplicações icons nas colunas … mas de uma forma mais complicada.

Algures na Net estava este exemplo.

Espero que ajude.

[code]DefaultTableModel model = new DefaultTableModel();
JTable table = new JTable(model);

// Create 2 columns
model.addColumn("Col1");
model.addColumn("Col2");
// the header value for this column will be overwritten
// with a TextandIcon object

// Set the icon renderer on the second column
table.getTableHeader().getColumnModel()
    .getColumn(1).setHeaderRenderer(iconHeaderRenderer);

// Set the text and icon values on the second column for the icon render
table.getColumnModel().getColumn(1).setHeaderValue(
    new TextAndIcon("Col2", new ImageIcon("icon.gif")));

// This class is used to hold the text and icon values
// used by the renderer that renders both text and icons
class TextAndIcon {
    TextAndIcon(String text, Icon icon) {
        this.text = text;
        this.icon = icon;
    }
    String text;
    Icon icon;
}

// This customized renderer can render objects of the type TextandIcon
TableCellRenderer iconHeaderRenderer = new DefaultTableCellRenderer() {
    public Component getTableCellRendererComponent(JTable table, Object value,
            boolean isSelected, boolean hasFocus, int row, int column) {
        // Inherit the colors and font from the header component
        if (table != null) {
            JTableHeader header = table.getTableHeader();
            if (header != null) {
                setForeground(header.getForeground());
                setBackground(header.getBackground());
                setFont(header.getFont());
            }
        }

        if (value instanceof TextAndIcon) {
            setIcon(((TextAndIcon)value).icon);
            setText(((TextAndIcon)value).text);
        } else {
            setText((value == null) ? "" : value.toString());
            setIcon(null);
        }
        setBorder(UIManager.getBorder("TableHeader.cellBorder"));
        setHorizontalAlignment(JLabel.CENTER);
        return this;
    }
};[/code]

[color=“green”]* Editado para incluir BBCode no codigo - Matheus[/color]

Cara, muito obrigado pela atenção, perguntei mal, :), até consegui fazer funcionar mas foi desenhado na coluna, mas eu queria que em cada LINHA, sei que perguntei cooluna, mas na verdade é linha, como o Explorer do Windows, cada registro da grade tem uma imagem, de um diretório ou do arquivo correspondente, sabe como faço isso tbm?

Valeu!
Samuel Cunha