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

Editing JTable

 
Kushi Gadiparthi
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I want to edit a single column in a JTable instaed of editing all the columns in the table,

I am using

then every row and column in the table is getting into editable mode,

But I don,t want this I just want to edit only one column and wanted remaining column must be in uneditable mode,

Could any one help me in this,


Thank you very much,
regards
 
Darryl Burke
Bartender
Posts: 5126
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Override isCellEditable(...) in either the table or its model. If the former, remember that unless you have disenabled it, columns can be dragged resulting in a view column index that is different from the model's.
 
Kushi Gadiparthi
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Darryl Burke,

Thank you very much for your quick reply,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic