How to make delete button to delete rows in JTable?

前端 未结 3 885
暗喜
暗喜 2021-01-24 10:05

I tried to make keystroke Delete but when I select cell and press delete button it enter in the selected cell instead to delete the whole row . How I can disable Delete button t

3条回答
  •  感情败类
    2021-01-24 10:21

    To disable the automatic edition mode try this :

    table.putClientProperty("JTable.autoStartsEdit", Boolean.FALSE);
    

提交回复
热议问题