Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable cell value change  RSS feed

 
Mason Zhao
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Friends,
Greetings!

I have a table(JTable), let the user input strings to cells(JTextField). This table has TableModelListener. I can get the values from the table,except the last one. I mean if user finish the inputs, he has to click somewhere on the table, otherwise the last input can not be captured.
I tried many ways, but still can not find a solution. Help please!
Your help is highly appreciated!

Mason
 
Rob Spoor
Sheriff
Posts: 20904
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pressing Enter (for confirming changes) or Escape (cancel) should also work.

You can also do this by code:
 
Mason Zhao
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you,Rob,

It really works. Have a great day!

Mason
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!