Disable a single column dragging in JTable

后端 未结 2 1687
失恋的感觉
失恋的感觉 2021-01-20 10:31

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.

2条回答
  •  时光说笑
    2021-01-20 11:04

    Not quite on point for you ....found on another blog

    yourJTable.getTableHeader().setReorderingAllowed(false)
    

    this gets the entire table not to reorder columns which is what I needed. Exploring the Override is the correct route

提交回复
热议问题