Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to set focus on cell of table

 
prashant gour
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on JTable and in one scenario I have to check the cell is empty or not, I am able to do that but now I want to set focus on that empty cell and also want to show cursor in that cell.
If any body have way out please share with me.

Thanks in advance

Prashant
 
prasanna kanth
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Prashant!,

To make a focus in a particular cell, the below code could help,




try the below code to point the cursor in the particular cell.

<Tablename>.editCellAt(row,column);

Hope, It could help u

PrasannA

[ June 09, 2006: Message edited by: prasanna kanth ]
[ June 09, 2006: Message edited by: prasanna kanth ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic