wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes JTable Runtime Addition Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable Runtime Addition" Watch "JTable Runtime Addition" New topic
Author

JTable Runtime Addition

java potter
Greenhorn

Joined: Jun 09, 2012
Posts: 2
well,im working on a staff attendance system..,and i just need to add the total number of days they have presented

now i want help in 2 things
1) creating rows in runtime

2)Adding values that entered in rows of class1,class2,class3,class4[the entered data will be in integer form] and all sum will be printed automatically in last row[cell]in Total


when it comes to second question

in case of compile time,we can do calculations as shows in
http://www.coderanch.com/t/499370/GUI/java/calculate-sum-jtable

but i want to do addition of data[int type] in cells and total should be automatically updated in last row,IN RUN TIME

well,i know its something to do with DefaultTableModel and Table Model,but i dont know what exactly to do as i even browsed about them in net,but not clearly understood..,

so here im giving my code:-



basing on code provided,please help me in doing it,as im newbie in programming,please do provide me the code,what should be added and please explain me what happened with the code,u provided...
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

Please BeForthrightWhenCrossPostingToOtherSites
http://www.java-forums.org/awt-swing/60531-adding-values-jtable-print-total-help.html


luck, db
There are no new questions, but there may be new answers.
java potter
Greenhorn

Joined: Jun 09, 2012
Posts: 2
hey im sorry,actually i created same topic on both sites so that i can receive help in any of site and i dont know same members will be on both sites,and i dont mean to cheat anyone with fake names,,..java potter is my another username but i dont mean any wrong..,anyways...thanks for link....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTable Runtime Addition
 
Similar Threads
Jtable focuslost
Customizing JTable
jtable
JTable Updating
JTable and getValueAt(int, int)