How to refresh data in JTable I am using TableModel

后端 未结 6 1148
情歌与酒
情歌与酒 2020-11-30 11:59

Hi,

I have created my TableModel and want to refresh JTable once I added a new row. What should be added to the listener to \"refresh\" JTable?

publ         


        
6条回答
  •  我在风中等你
    2020-11-30 12:37

    For a more general solution you can use the Row Table Model and just implement the getValueAt() and setValueAt() methods.

    Here should be some code that will be firing my table after adding new row!

    The model is responsible for invoking the proper fireXXX method.

提交回复
热议问题