non so se ho capito bene ma questa potrebbe essere una soluzione
Codice PHP:
JTable t = new JTable();

        
int righe t.getRowCount();
        
int colonne t.getColumnCount();
        
int somma 0;
        for (
int i =i<colonne ;i++){
            for (
int j=1j<righe-1j++){
                
somma += (Integer)t.getValueAt(ji);
            }
            
t.setValueAt(sommarighei);
        }