Disable a single column dragging in JTable

java, jtable, swing, user-interface

Solution

You should be able to create your own `TableColumnModel` (extend DefaultTableColumnModel) and to override `moveColumn` to only call `super.moveColumn` when the column is allowed to be dragged.

EDIT: Have a look at this post first.

Problem

How should I disable just a single column from dragging in JTable? I want to allow other columns from dragging but just the first column (indexed at 0). Thanks.

Original source

Related problems