Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

want help in JTable  RSS feed

 
Sudhir Pawar
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am totally beginner for Jtable..
I have crated Jtable in eclipse with column name 1. sr_no 2.quantity 3.rate 4.discount 5.total with 100 rows
now i want to set total value( total=quantity*rate*discount /100) in column total automatically after entering column quantity rate discount values in each row.
How can i do this please help me to solve it.
 
Rob Camick
Ranch Hand
Posts: 2801
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Override the setValueAt(...) method of your TableModel. Whenever a value is changed, then you can recalculate the total.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!