Mais simples que isso eh impossível…
Bastou procurar um pouquinho no Sr. Google, e tudo se acha.
Fonte: http://exampledepot.com/egs/javax.swing.table/Tips.html
Código com um pequeno acrescimo…
JTable table = new JTable()
{
public Component prepareRenderer(TableCellRenderer renderer,
int rowIndex, int vColIndex)
{
Component c = super.prepareRenderer(renderer, rowIndex, vColIndex);
if (c instanceof JComponent)
{
// Minha adaptação, pq quando um objeto da tabela eh do tipo Integer, por exemplo, não se converte para
//String com um simples cast, como citado no fonte desse exemplo.
Object o = getValueAt(rowIndex, vColIndex);
//Fim adaptacao.
JComponent jc = (JComponent)c;
jc.setToolTipText(o.toString());
}
return c;
}
};
Flw!