开发者

Refreshing a jtable to reflect a change made to the database-JAVA MYSQL

H开发者_如何学编程ow do you reload a jtable after carrying out a delete or insert on DB


Well, the safest way is probably to re-execute the DB query used to get the table data, then rebuild a table model, and call setModel on your JTable (or pass the new data to a custom setData() method of your TableModel implementation, and call fireTableDataChanged() from this setData() method).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜