 <p>When you load in a <code>File</code> in the <code>open</code> JButton <code>ActionListener</code>, the code creates a new <code>TableModel</code> and sets the <code>JTable</code> model:</p> <pre><code>MyModel NewModel = new MyModel(); table.setModel(NewModel); </code></pre> <p>The <code>NewModel</code> instance is local to this method, thus any changes to the instance variable <code>model</code> will not be reflected in the <code>JTable</code> (in other words, <code>model != table.getModel()</code>). Instead of creating a local variable, set the instance variable to the new model. For example: </p> <pre><code>model = new MyModel();//sets the instance variable to the new model table.setModel(NewModel); </code></pre> <p>In this way, whenever code refers to <code>model</code>, it is acting on the current <code>TableModel</code> of the <code>JTable</code>. Alternatively, when making changes to the <code>TableModel</code>, you can get the model directly from the <code>JTable</code>, casting if necessary:</p> <pre><code>remove.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { int row = table.getSelectedRow(); MyModel myModel = (MyModel)table.getModel();//get the model directly if (row!=-1) myModel .deleteRow(row); } }); </code></pre>