Thanks ! its actually working now. I have been using different objects of my table model at different points. like
table.setModel(new MyTableModel());
new MyTableModel().insertRecord();
The tablemodel object that table is using is not getting updated after an insert. No wonder the table is not refreshed. With everything working now all that looks like silly mistakes.