title: Bind HashTable/Map to Jtable
body: <p>I have a C# background and I'm pretty new to Java. Trying to port my windows application to Mac using Java.</p>
  
  <p>The issue I have is how to bind a HashTable that contains a class to a JTable so that the variables in the key show up in the JTable. In C# WPF it's very easy, just binding GridView.ItemSource to dictionary.keys. But in Java it seems much more complicated. Here is what I have so far:</p>
  
  <pre><code>Map&lt;Files, String&gt; files = new HashMap&lt;Files,String&gt;();
  
  public class Files {
         public Files(String files, String duration, String status) {}
                     }
  
  public void AddFiles(String addfile, String addduration, String addstatus, String path){
              files.put(new Files(
                      addfile, addduration, addstatus), 
                      path);
              }
  </code></pre>
  
  <p>In C# the class would look a little different, but I can just do GridView.Itemsource = files.Keys and voila, it all shows upp perfectly. How can I achieve something similar in Java?</p>
  
  <p>I know that JTable can use a multidimensional array to load the values, so I am right now trying to load the values of HashTable into <code>Object[][] tableData</code> and then use:</p>
  
  <pre><code>String[] columnNames = {"File","Duration", "Status"};
  final JTable table = new JTable(tableData, columnNames);
  </code></pre>
  
  <p>The problem is that I don't know how to access the variables inside the class "Files" inside the HashMap "files".</p>
  
  <p>I know there is: <code>.getKey().getClass()</code> but I still haven't been able to load the multidimensional array with the values of the class "Files" inside the HashMap.</p>