@@ -0,0 +1,1515 @@
+package devopsdistilled.operp.client.items;%0A%0Aimport java.util.LinkedList;%0Aimport java.util.List;%0Aimport java.util.Vector;%0A%0Aimport javax.swing.table.AbstractTableModel;%0A%0Aimport devopsdistilled.operp.server.data.entity.items.Item;%0A%0Apublic class ItemTableModel extends AbstractTableModel %7B%0A%0A%09private static final long serialVersionUID = 637464853861264641L;%0A%0A%09private final Vector%3CString%3E columnNames;%0A%09List%3CItem%3E items;%0A%0A%09public ItemTableModel() %7B%0A%09%09items = new LinkedList%3C%3E();%0A%09%09columnNames = new Vector%3C%3E();%0A%09%09columnNames.add(%22Item ID%22);%0A%09%09columnNames.add(%22Item Name%22);%0A%09%09columnNames.add(%22Product%22);%0A%09%09columnNames.add(%22Brand%22);%0A%09%09columnNames.add(%22Price%22);%0A%09%7D%0A%0A%09@Override%0A%09public int getRowCount() %7B%0A%09%09return items.size();%0A%09%7D%0A%0A%09@Override%0A%09public int getColumnCount() %7B%0A%09%09return columnNames.size();%0A%09%7D%0A%0A%09@Override%0A%09public Object getValueAt(int rowIndex, int columnIndex) %7B%0A%09%09Item selectedItem = items.get(rowIndex);%0A%09%09switch (columnIndex) %7B%0A%09%09case 0:%0A%09%09%09return selectedItem.getItemId();%0A%09%09case 1:%0A%09%09%09return selectedItem.getItemName();%0A%09%09case 2:%0A%09%09%09return selectedItem.getProduct();%0A%09%09case 3:%0A%09%09%09return selectedItem.getBrand();%0A%09%09case 4:%0A%09%09%09return selectedItem.getPrice();%0A%09%09default:%0A%09%09%09return null;%0A%09%09%7D%0A%09%7D%0A%0A%09@Override%0A%09public String getColumnName(int column) %7B%0A%09%09String columnName = null;%0A%0A%09%09if (column %3C columnNames.size() && (column %3E= 0)) %7B%0A%09%09%09columnName = columnNames.elementAt(column);%0A%09%09%7D%0A%0A%09%09return columnName;%0A%09%7D%0A%0A%09@Override%0A%09public boolean isCellEditable(int rowIndex, int columnIndex) %7B%0A%09%09return false;%0A%09%7D%0A%7D%0A

Define a Custom TableModel, ItemTableModel