title: how to limit the rows adding in JTable?
body: <p>I have a few text fields, A <code>JTable</code> and a <code>Button</code> (ADD).</p>
  
  <p>Now, every time the button it gets the <code>JTextField</code>s data and adds a row in <code>JTable</code>.
  And it adds the unlimited number of rows. I want to add only <code>10</code> rows.</p>
  
  <pre><code>public void setItemDetailInTable() {
      String free = freetext.getText();
      Object row[] = new Object[20];
  
  
      row[0] = itemcombo.getSelectedItem().toString();
      row[1] = mfgtext.getText();
      row[2] = sachsntext.getText();
      if (free.isEmpty()) {
          row[3] = qtytext.getText();
      } else {
          row[3] = qtytext.getText() + "+" + freetext.getText();
      }
      row[4] = pricetext.getText();
      row[5] = taxtext.getText() ;
      row[6] = discounttext.getText() ;
      row[7] = total.getText();
  
      model_table.addRow(row);
  }
  </code></pre>