• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable problem...........!

 
Sachin Dimble
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,
I am facing the following problem,
I have created jtable with an two dimensional(2 col,10 row) array user edits the cell wit any values and clicks an button, on which i am collecting these data(simply fetching an array elements). now lets say user fills first row and dosen't move to second row and clicks the button. on collecting these data i am getting null valu for second cell of tat row. but if user moves down to next row then i am getting all the values. i don't want to code TableModule for this so is there any other solution?

Regards,
Saaaaachin!!!
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try adding this line

table.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
 
Sachin Dimble
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a ton Michael! now it's working fine,and i got the point too.

-Saaaaachin!!!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!