• Post Reply Bookmark Topic Watch Topic
  • New Topic

Focusing a JTable Cell when JDialog is invoked  RSS feed

 
Vijay Chandran
Ranch Hand
Posts: 186
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I enter a data in the cell and invoke CTRL + F optionFocusing a JTable Cell when JDialog is invoked

Dear all,
I have a JTable in my application with 25 rows. I enter a data inside the cell and while editing. i.e., the cursor is inside the cell, i invoke the Find/Replace functionality by CTRL + F.

If i am entering say, "abc" in the table cell and invoke CTRL + F and enter "abc" in the "Find What" Text box, an error message is displayed "data is not present".

When the focus shifts from the table cell to the JDialog in my application, the cell border doesn't get highlighted as in Excel.

If i enter "abc" in 2 cells and invoke CTRL + F from one of the cells, the cell data from which i invoked CTRL + F is not found by my application but the other "abc" is found.

Please give your kindly help.
Thanks,
Vijay
 
Jack Lau
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I also encounter this problem that focusing a JTable Cell when JDialog is invoked. A JDialog popup and then I click "OK", and I would like the focus to a specified cell in JTable but the focus cannot be set.



Does anyone know how to do?

Thanks
Jack
 
paritosh pandey
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am also facing the same problem.I want the focus on the cell where a error is occured after JDialogBox pops us with error msg.Did you people got any solution???.please help
 
Brian Cole
Author
Ranch Hand
Posts: 936
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by vijaychandran rajagopalan:
I have a JTable in my application with 25 rows. I enter a data inside the cell and while editing. i.e., the cursor is inside the cell, i invoke the Find/Replace functionality by CTRL + F.

If i am entering say, "abc" in the table cell and invoke CTRL + F and enter "abc" in the "Find What" Text box, an error message is displayed "data is not present".


Does it continue to not find the just-typed "abc" if you call
yourTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE)
?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!