I have constructed my tableview using SceneBuilder.
I am trying to add different context menus for the table and rows as described here.
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?
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.
For now, I have disabled the row-level context menu by -
// only display context menu for non-null items:
row.contextMenuProperty().bind(
Bindings.when(Bindings.isNotNull(row.itemProperty()))
.then(rowMenu)
.otherwise((ContextMenu)null));