• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to make the values in a column of jtable non editable?  RSS feed

 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can anyone help me in making the values in a single column of jtable non-editable.

Regards,
Agatha.
 
Rachel Swailes
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Agatha



You need to put this code into your TableModel. Then you need to modify it to suit you. What this does is when the user clicks on a cell, the jtable asks the table model if the cell that the user is clicked on is editable or not.

What this code does is tell the jtable that if the column in column 7, that the cell is editable.

Cheers,
Rachel
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!