Exception in thread “AWT-EventQueue-0” java.lang.ClassCastException: javax.swing.JTable

后端 未结 2 718
温柔的废话
温柔的废话 2020-12-22 02:51

I have a code which when run generates a table in swing form which contains a set of checkboxes which can be selected or unselected

When I click on the Check All ta

2条回答
  •  情话喂你
    2020-12-22 03:33

    On line 152: JTableHeader header = (JTableHeader)(e.getSource()); you are assuming the event is on the table header. You need to check event source's class to see if it's on the header or an individual checkbox.

提交回复
热议问题