A simple way to add a summation row would be to have your table model simply expose the totals as a new row of data.
To make it remain visible would be a completely different matter, though.
I would do this by adding a separate table to another scrollpane (with no scrollbars) beneath the scrollpane containing your table. The horizontal offset could be linked between the two using a changeListener. You'd also have to listen to changes in the table column model to maintain column widths between the two tables.
This table could get its data from another table model that reacted to changes in the first table model.
Doing this generically is definitely possible and would give you a reusable summation row component.
Hope this helps.
A simple way to add a summation row would be to have your table model simply expose the totals as a new row of data.
To make it remain visible would be a completely different matter, though.
I would do this by adding a separate table to another scrollpane (with no scrollbars) beneath the scrollpane containing your table. The horizontal offset could be linked between the two using a changeListener. You'd also have to listen to changes in the table column model to maintain column widths between the two tables.
This table could get its data from another table model that reacted to changes in the first table model.
Doing this generically is definitely possible and would give you a reusable summation row component.
Hope this helps.onent.
Hope this helps.