JTable removeRow(), removing wrong row

后端 未结 2 651
别跟我提以往
别跟我提以往 2020-12-12 04:56

I have a JTable and I need to remove a row, namely, the selected row.

So first, I get the the table model :

    DefaultTableModel model = (DefaultTab         


        
2条回答
  •  [愿得一人]
    2020-12-12 05:33

    If is JTable filtered or sorted then you can convert

    int modelRow = convertRowIndexToModel(row);
    

提交回复
热议问题