title: remove rows from JTable with AbstractTableModel
body: <p>I would like to remove selected row from <code>JTable</code> with <code>AbstractTableModel</code> using a button.</p>
  
  <p>The code below works with DefaultTableModel:</p>
  
  <pre><code>...
  MyTableModel mtb;
  ...
  private String[]....
  private Object[][]...
  ...
  JTable table = new JTable(mtb)
  JButton delete;
  ...
   public void actionPerformed(ActionEvent e) {
  
          if(e.getSource().equals(delete))
           {
                   if(table.getSelectedRow()&lt;0)
                   {
                    JOptionPane.showMessageDialog(this,"Select row");
  
                   }
                   else
                   {
                       mtb.removeRow(table.getSelectedRow()); 
  
                   }
           }
       }
  </code></pre>
  
  <p>but it deosn't work with <code>AbstractTablemodel</code>.</p>
  
  <p>I have a little mess in my code so here is <a href="http://docs.oracle.com/javase/tutorial/displayCode.html?code=http://docs.oracle.com/javase/tutorial/uiswing/examples/components/TableDemoProject/src/components/TableDemo.java" rel="nofollow">java example</a> from oracle page that can be used:</p>
  
  <p>Thanks!</p>