you can do that by using method
public boolean isCellEditable(int row,int col)
e.g.
DefaultTableModel dtModel=new DefaultTableModel(dataValues, columnNames);
table = new JTable(dtModel)
{
public boolean isCellEditable(int row,int col)
{
if(row<data_row_cnt)
{
if(col==7 || col==8 || col==17 || col==18 || col==21)
return true;
}
return false;
}
};
if you want ti disabled cell no 2,3 means 2nd row ,3rd column
then just chk row==2 && col=3 return false otherwise return true>