Pessoal, eis um trecho do meu código:
private JScrollPane create(final Integer obj[][]) {
int i,j;
TableModel dataModel = new AbstractTableModel() {
public int getColumnCount() { return numc; }
public int getRowCount() { return numl;}
public Integer getValueAt(int row, int col) { return obj[row][col]; }
public boolean isCellEditable(int row, int col)
{ return true; }
public void setValueAt(Integer value, int row, int col) {
if (value instanceof Integer)
{
obj[row][col] = (Integer)value;
}
else
{
System.out.println(“deu erro”);
System.exit( 0 );
}
fireTableCellUpdated(row, col);
}
};
…
…
O que acontece é que se eu ponho um valor inteiro na célula, ele não aborta o programa, ou seja, value é uma instancia de Integer, porém não atribui o valor…
Alguém já tem experiência com tabelas com Integers? Eu pesquisei e me pareceu certo esse código. Qualquer ajuda é muito bem-vinda.
muito obrigado, Luiz Gustavo
