title: Writing to log file doesent show walues
body: <p>i am haveing trouble when i try to write values to csv file, i only get default values. Inside add button action listener i have for loop that only shows default from column model set on top, and i dont have any ideas so please help.</p>
  
  <p>edit: i have this values inside the food log and they are displayed correctly, but in log.csv they dont exist</p>
  
  <pre><code>    /*
       * Creating default model and adding labels for food nutrients
       */
      columnModel = new DefaultTableModel();
  
      columnModel.addColumn("Name");
      columnModel.addColumn("Unit Amount");
      columnModel.addColumn("Calories");
      columnModel.addColumn("Fat");
      columnModel.addColumn("Protein");
      columnModel.addColumn("Carbs");
  
      recordBoard = new JTable(columnModel);
      recordBoard.setPreferredScrollableViewportSize(recordBoard.getPreferredSize());
      recordBoard.setFillsViewportHeight(true);
      JTableHeader header = recordBoard.getTableHeader();
      add(header);
      add(recordBoard);
  
      JPanel logButton = new JPanel();
      logButton.setLayout(new BoxLayout(logButton, BoxLayout.X_AXIS));
  
      /*
       * Creating search text field for all foods
       */
      JLabel comboBoxLabel = new JLabel("Search all Foods: ", JLabel.RIGHT);
      csvFoods = new JComboBox();
      logButton.add(comboBoxLabel);
      logButton.add(csvFoods);
  
      /*
       * Creating new button for saveing food records
       */
      recordSave = new JButton("Add Food");
      recordSave.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
              controller.addLogRow(String.valueOf(csvFoods.getSelectedItem()), columnModel);
  
              try {
                  columnModel = (DefaultTableModel) recordBoard.getModel();
                  FileWriter fw = new FileWriter(new File("log.csv"), true);
                  Calendar cal = Calendar.getInstance();
                  recordBoard.getTableHeader().setUI(null);;
                  fw.write("\n");
                  fw.write(cal.get(Calendar.YEAR) + ",");
                  fw.write(cal.get(Calendar.MONTH) + 1 + ",");
                  fw.write(cal.get(Calendar.DATE) + ",");
                  fw.write("f" + ",");
                  for (int i = 0; i &lt;= 5; i++) {
                      fw.write(columnModel.getColumnName(i) + ",");
                  }
                  fw.write("\n");
                  fw.close();
              } catch (IOException e1) {
                  e1.printStackTrace(); 
              }
          }
      });
  </code></pre>