JTable Java Error Stack OverFlow when setvalue to a specific column

≯℡__Kan透↙ 提交于 2019-12-02 02:48:15

JTable#setValueAt will call TableModel#setValueAt, which will trigger a TableChanged event, which is why it's causing you a StackOverflowException (it's caught in an infinite loop)

The better solution would be to override the TableModel#setValueAt and if the column 0, 1 or 2 is updated, also calculate the value for column 3, but don't forget to fire a cellUpdated event

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!