I want to make non-editable to table.
I am taking data using DbUtils. I can take the data but I can not make non-editabale.
try { String SQL = "SELECT * FROM tblmalzemeler "; preparedStatement = baglanti.prepareStatement(SQL); resultSet = preparedStatement.executeQuery(); tableMalzeme.setModel(DbUtils.resultSetToTableModel(resultSet) ); } catch (Exception e) { }
Probably I should use isCellEditable method but I can not make it. How can I put following code in setModel method.
boolean[] canEdit = new boolean [] { false, false, false, false, false, false, false, false }; public boolean isCellEditable(int row, int col) { // iscelleditable function return false; }