Skip to main content

How to enable some columns movable and disable other columns movable with JTable or JXTable

1 reply [Last post]
nepxion
Offline
Joined: 2010-04-19
Points: 0

How to enable some columns movable and disable other columns movable with JTable or JXTable

e.g. there are 'index', 'a', 'b', 'c' 4 columns, 'index' column should be always first and can't be moved, and 'a', 'b', 'c' columns' moving works.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
arnavkumartechno
Offline
Joined: 2013-10-25
Points: 0

Re: How to enable some columns movable and disable other columns movable with JTable or JXTable

Create your TableColumn class extend it with DefaultTableColumnModel and override moveColumn to call super.moveColumn. It will do what you want