• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Left most column locking

 
Narayanan Jayaraman
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can some one tell me how to lock the left most column in JTable ? Thanks
 
Abhik Sarkar
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Narayanan,
What do you mean by lock... diallow editing or disallow moving?
If it is disallow editing, you could override the isCellEditable method of your table model in such a way that it returns false only for that column:

Hope I understood your query correctly.
Abhik.
 
Narayanan Jayaraman
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Abhik,
When scrolling table columns to the right, I want to lock the 1st column in the table, so that user can see the first column always, even when they scroll the other columns. Thanks
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Narayanan,
It appears that you haven't yet discovered Tamemusa's Swing examples
(Look for the "Fixed Column" example at the bottom of that Web page!)
Hope it helps.
Good Luck,
Avi.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic