开发者

Update JTable in runtime

I have a JTable which represents a database table. In runt开发者_如何转开发ime when I click a button I want to update my table from database. It is working if the button is in that panel where the table is. When I try to create an object from other class it is not working.

How can I update a JTable from outside of the class in running?


Yes, you can. Just pass a reference to the TableModel to the other class. When the other class changes the TableModel, the JTable will be automatically updated.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜