• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable updation on the run

 
Ransika deSilva
Ranch Hand
Posts: 524
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello World,
I am trying to update a JTable from the use of the bellow code. I have declared and initialised the
JTable in the constructor of the class. The problem is, when the new row is added the table
doesn't immidiately get updated. It gets updated with the nnew entry when I scroll down.
Please tell me to update the JTable.
bill_array[bill_int][0] = biiddataIc_jtf.getText();
bill_array[bill_int][1] = biiddataPpu_jtf.getText();
bill_array[bill_int][2] = biiddataQty_jtf.getText();
bill_array[bill_int][3] = bipddataDis_jtf.getText();
bill_array[bill_int][4] = bipddataSt_jtf.getText();
bill_array[bill_int][5] = "";
bibill_jt = new JTable(bill_array, columnNames);
bill_int++;
Thanks
 
Ransika deSilva
Ranch Hand
Posts: 524
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the setValue method to achieve the same perpose.It works. Sorry for bugging you guys.
Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!