title: getColumnCount() won't return anything higher than 7
body: <p>I've been following along a tutorial on Youtube and everything works. I tried to make modifications on my own which is my question right now. When I use <code>getColumnCount()</code> to return 7, it works. Anything higher than that gets me a <code>java.lang.ArrayIndexOutOfBoundsException:7</code></p>
  
  <p>Here's the video in the specific time:
  <a href="https://youtu.be/OxaSi3nSl3I?t=15233" rel="nofollow noreferrer">https://youtu.be/OxaSi3nSl3I?t=15233</a></p>
  
  <p>Here's my code (refer to getColumnCount):</p>
  
  <pre><code>package view;
  
  import java.util.List;
  
  import javax.swing.table.AbstractTableModel;
  
  import model.Product;
  
  public class ProductTableModel extends AbstractTableModel {
  
      private List&lt;Product&gt; db;
  
      private String[] colNames = {"ID", "Product", "Unit Price", "Quantity", "Service", "TIN", "TIN Number "};
  
      public ProductTableModel() {
  
      }
  
      @Override
      public String getColumnName(int column) {
  
          return colNames[column];
      }
  
  
      public void setData(List&lt;Product&gt; db) {
          this.db = db;
      }
  
      @Override
      public int getColumnCount() {
          return 7;
      }
  
  
      @Override
      public int getRowCount() {
          return db.size();
      }
  
      @Override
      public Object getValueAt(int row, int col) {
          Product product = db.get(row);
  
          switch(col) {
          case 0:
              return product.getId();
          case 1:
              return product.getProdName();
          case 2:
              return product.getUnitPrice();
          case 3:
              return product.getqtyCategory();
          case 4:
              return product.getDpCat();
          case 5:
              return product.isHasTin();
          case 6:
              return product.getTinNum();
  
          }
  return null;
      }
  
  }
  </code></pre>
  
  <p>Any help is appreciated :D</p>