• Post Reply Bookmark Topic Watch Topic
  • New Topic

commit data in selected row JTable

 
Ronnie Phelps
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I edit a cell in a JTable. The cell text doesn't actually get set because I didn't tab out of the cell. Then when I try calling my method getSelectedText() which uses the text, the text isn't available because the cell still has the focus and was never edited. How do I manually commit the text when the cell still has the focus???
 
Ronnie Phelps
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I figured this one out my self for thos who need to now I just called:
jtable.getCellEditor().stopCellEditing()
before attemption to use the text
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!