How to refresh a JTable after database operations without frame reload?
问题 I want to refresh a JTable after performing db operations like insert/update/delete without frame reload. Is there a programmatic solution to do so? 回答1: The answer depends on what type of TableModel you're using...and at what level the events are occuring. For example, if you have some kind of background Thread or "update" button and want to reload the content from the database, simple create a new TableModel based on the results from the database and apply it to the current JTable , this