Results 1 to 1 of 1
- 10-25-2010, 06:23 PM #1Member
- Join Date
- Sep 2010
- Rep Power
how to sort jtable with row groups
I am writing my first production application for work, it scrapes data from a telnet session and displays it in a jtable. The data displayed is call disposition statistics for individual agents in a market research center. It provides filtering by center location, and whether the agent is currently active on the project in question. The data displayed may be totals, averages, or percents, depending on the view mode.
I must now allow the table data to be printed, but the printout must contain three rows for each agent (total, ave, and percent), and three rows at the end with the totals for the job. The screen display code works fine (though i'm sure it could be done more elegantly)
I think that I can build a special table for printing (not displayed to the user) and just insert the extra rows for percent and ave, but I would like to have the data sorted by whichever column is currently sorted on the displayed table.
If I add the primary row (totals) for each user ( essentially duplicate the on screen table) and sort it, then go back and insert the ave and percent rows after each main row, will the model try to re-sort the table after each row insertion? Is there a better / simpler way to implement this?
The displayed table can and does change constantly, with a loop that updates the numbers, and adds and removes users as they become active and inactive.
Thanks for your advice,
- By anilkumar_vist in forum Advanced JavaReplies: 1Last Post: 12-11-2009, 06:23 PM
- By itaipee in forum AWT / SwingReplies: 3Last Post: 04-16-2009, 01:03 PM
- By BLR in forum Advanced JavaReplies: 2Last Post: 03-16-2009, 11:41 AM
- By johnt in forum AWT / SwingReplies: 3Last Post: 06-14-2008, 06:48 AM
- By Alan in forum AWT / SwingReplies: 2Last Post: 05-14-2007, 06:18 PM