Change/Update JTable content with JComboBox(category)

前端 未结 2 1864
广开言路
广开言路 2021-01-23 07:47

I have a problem with my JTable. My JTable displays content of a database. One database table has the name category. Every category is displayed in the JComboBox. If I click on

2条回答
  •  無奈伤痛
    2021-01-23 08:43

    Try below code after you change the data in jtable.

    model.fireTableDataChanged(); table.repaint();

    where model is the tablemodel object and table is JTable object

    I hope it helps!!!

提交回复
热议问题