title: How do I hide the extra rows in javafx tableview?
body: <p>I have constructed my tableview using SceneBuilder. </p>
  
  <p>I am trying to add different context menus for the table and rows as described <a href="http://www.marshall.edu/genomicjava/2013/12/30/javafx-tableviews-with-contextmenus/" rel="nofollow">here</a>.</p>
  
  <p>My table has 2 rows with actual data. By default, the extra space gets filled with a bunch of empty rows. Is there a way to disable the addition of the empty rows? </p>
  
  <p>My goal is to display the row specific context menus when I click on the rows and the tableview-level context menu in the rest of the table.</p>
  
  <p>For now, I have disabled the row-level context menu by - </p>
  
  <pre><code>// only display context menu for non-null items:
  row.contextMenuProperty().bind(
    Bindings.when(Bindings.isNotNull(row.itemProperty()))
    .then(rowMenu)
    .otherwise((ContextMenu)null));
  </code></pre>