public boolean isCellEditable(int row, int col) { if (col < 6) { return false; } else { return true; } } }
Steven Bell
Ranch Hand
Joined: Dec 29, 2004
Posts: 1071
posted
0
For that type of behavior you would want to create your own table model. For such a little change you could probably do it in an anonymous inner class that subclasses DefaultTableModel.
If you want more control over the model you can create a subclass of AbstractTableModel, which is not to difficult. The main advantage I see with AbstractTableModel vs DefaultTableModel is picking your own storage. DefaultTableModel uses a Vector, which is fine for most small/medium tables.