Swing/JTable Not Updating After Bound Data Fires Change

前端 未结 4 1806
悲哀的现实
悲哀的现实 2021-01-22 18:16

I have a JTable which is bound to my EventTracker bean, essentially a wrapper around a list which I will use as append/clear only (i.e., a simple log). Problem is, when I add en

4条回答
  •  不要未来只要你来
    2021-01-22 18:39

    you need to tell the table that the datamodel changed:

    .fireTableDataChanged()

    is the correct method; assuming that your table descends from the Abstract Table Model.

    (so yes, I agree with trashgod)

提交回复
热议问题