JavaFX's TableView
has a placeholder property that is basically a Node
that gets displayed in the TableView
whenever it is empty. If this property is set to null (its default value), it appears as a Label
or some other text based Node
that says "There is no content in the table."
But if there are any rows of data in the table, then the placeholder Node
disappears and the entire vertical space in the TableView
gets filled with rows, including empty rows if there isn't enough data to fill the whole table.
These empty rows are what I want, even when the table is empty. In other words, I don't want to use the placeholder at all. Does anyone know how I can do this?
I'd rather not do something kludgey like put a empty-looking row in the TableView
whenever it's supposed to be actually empty.