title: JavaFX TableView Objects with Maps
body: <p>So I have done some digging around on the JavaFx TableView and I have found some nice solutions to simple situations. </p>
  
  <p>This <a href="http://docs.oracle.com/javafx/2/ui_controls/table-view.htm" rel="nofollow">article</a> provides a nice explanation of how to create a Table with a Person object and also shows how to create a Table using a Map. </p>
  
  <p>Here is my problem, let's say I have an Object Person that contains some simple member data and also a Map of Assignments to Grades.</p>
  
  <p>Example:</p>
  
  <pre><code>public class Person {
     String firstName;
     String lastName;
     String age;
     Map&lt;Assignment, Grade&gt; map;
   }
  </code></pre>
  
  <p>I want to display a table like the following</p>
  
  <pre><code>firstName |  lastName | age | Assignment1 | Assignment 2 | Assignment 3 | ...
  </code></pre>
  
  <p>If I define a Table like so:</p>
  
  <pre><code>private TableView&lt;Student&gt; table;
  </code></pre>
  
  <p>It is easy to define simple columns like:</p>
  
  <pre><code>private TableColumn&lt;Student, String&gt; firstNameColumn =
       firstNameColumn.setCellValueFactory(new PropertyValueFactory&lt;Person, String&gt;("firstName"));
  </code></pre>
  
  <p>But how should I go about defining columns for each of the keys in the map?</p>
  
  <p>Is this even possible or should I just create another table that handles the map?</p>