• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Adding A Total Row at the End of a JTable

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?

 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this might be one way, but you'll probably need to tweak the column widths

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic