Dave Tolls wrote:Where is the variable total declared?
It looks like it's not local to the method, so the value is retained between calls to stateChanged.
Carey Brown wrote:Where do you initialize total to zero?
Can you explain more on this ?
Rob Camick wrote:Don't keep a "total" variable.
simply iterate through all the rows in the table to recalculate the total.
John Joe wrote:How should I get rid of the first row of JTable in order to get the total value ?