How to change JTable as editable and not in another choice?

I will just introduce some details into JTable. and save this data in my database with a specific identifier. But if I get this data in id-based JTable, then JTable should not allow the operation to be edited at this time. it is just for the purpose. How to set whether Jtable is allowed or not based on user choice. (Insert, Search)

+1
source share
2 answers

Variability is controlled primarily by the method isCellEditable TableModel.

You can set a parameter in yours TableModelthat can return falseif you want the model to be read-only.

+1
+1

All Articles