How to make JTable show refreshed data after updating database?
问题 I have updated a database and I would like to refresh a JTable with this code tied to a button click event, but it doesn't work. When I close aplication and open it again JTable shows the right data. Do I need to override some method on my abstract table? try { model=new MyTableModel(this.database); table = new JTable(model); } catch (SQLException e) { e.printStackTrace(); } scrollPane = new JScrollPane(table); refresh.addActionListener(new ActionListener() { public void actionPerformed