Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Adding A Total Row at the End of a JTable

 
Lilian Chase
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I wish to add a total row at the end of my data in a JTable. However I want the total row to always remain visible throughout scrolling and when data is sorted.

I came across suggestions about using two tables but wouldn't the second table aka the total row be below the JScrollPane?

Another suggestion was interesting > link

Jeff Albertson suggested adding the row to the south region of the JScrollPane. How would that be implemented?

Any other suggestions on methods to implement the total row at the foot of the JScrollPane?

 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this might be one way, but you'll probably need to tweak the column widths

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic