public static void removeFromTable(int index) throws NullPointerException {
		if (tableData!=null){
		int datalength = tableData.length -1;
		Object[][] temp = new Object[datalength][5];
		total -= (Integer) (tableData[index][2])
				* (Integer) (tableData[index][3]);
		Item tempitem=new Item();
		tempitem.setId((Integer)(tableData[index][0]));
		Item item = itemList.get(itemList.indexOf(tempitem));
		item.changeQuantity((Integer)(tableData[index][2]));
		modifyItem(item);
		if (tableData != null)
			for (int i = 0; i < datalength; i++)
				for (int j = 0; j < 5; j++){
					if (i < index){
						temp[i][j] = tableData[i][j];
					}
					else 
					{
						temp[i][j] = tableData[i+1][j];
					}
				}
		tableData = temp;
		}
	}