JTable, disable user column dragging

前端 未结 2 558
名媛妹妹
名媛妹妹 2021-01-31 00:57

I have declared my JTable as:

data_table = new JTable(info, header) {
    @Override
    public boolean isCellEditable(int row, int column) {
                


        
2条回答
  •  被撕碎了的回忆
    2021-01-31 01:46

    To anyone having this problem using Netbeans IDE you can disable the user from dragging columns in the JTable by doing the following steps.

    • Right click the table
    • Select Table contents
    • Click the columns tab
    • Uncheck the Allow to reorder columns by drag and drop

提交回复
热议问题