Antony Amicone wrote:my classes are really big to get easily a SSCCE cause i used netbeans to make dialogs
Paul Clapham wrote:If your table cell is not editable, and you don't know why, the problem is in how you configured the table. Database code could
have absolutely nothing to do with that.
Paul Clapham wrote:Unfortunately that code requires us to be running Netbeans and it requires us to have a MS Access database of a
certain form at a certain place in the root directory of our C drive on our computer which is required to be running
Windows.
There's a lot more stuff in that code which isn't relevant to your question, too.
So if you remove the database access and replace it by hard-coded data, and get rid of all of the Netbeans-related
classes (that's org.desktop.whatever), that would be a good start. All you need to study this problem is a simple class
which has a JTable and nothing else.
Rob Camick wrote:The database has nothing to do with editing. All the database does is provide data.
Editing is controlled by the isCellEditable() method of the TableModel. When using a DefaultTableModel this method allows all columns to be edited. When extending the AbstractTableModel the default is to not allow editing. So if you want editing you need to implement the method in your custom model.
Ruth Stout was famous for gardening naked. Just like this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|