plz aid me

i have one doubt in JTable .(1)how to set JTable's row enable is true and JTable's cell editable or enable is false... if you know plz answer me......i am wating for replybyStalin.G
[218 byte] By [stalin_gnana@sun.coma] at [2007-11-27 9:13:15]
# 1

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>

sagar_biraria at 2007-7-12 22:00:29 > top of Java-index,Desktop,Core GUI APIs...