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

focus Got stuck in JTable  RSS feed

 
prashant gour
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when I clicked outside of table on other component, cell still remains selected and because of this i am not able to save value to model.

so how can i remove focus from cell on clicking on other component except table.

if any body have idea please help me out
Thanks in advance.
 
prasanna kanth
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi try this,

tableName.clearSelection();
or
tableName.changeSelection(row,column,true,false);

use this in focus lost of JTable

I think it could help u
 
prashant gour
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that wont work prasanna, I am repeating my problem when i edit any cell that operation does not complete till i did move on next cell, but now i want to edit this cell clicking on any other component

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