JavaFX 2: TableView: remove title + show grid when empty

I have 2 questions about TableView in Javafx2:

1) Is it possible to hide the headers in the table?

2) When the table is empty, it simply shows a white panel that says "There is no content in the table." Is it possible to change this to display the default grid, even if the table is empty?

If possible, Id as a solution with CSS (javacode is also great).

Thanks in advance.

+4
source share
1 answer

The answer to the first question is here . Please note that you can hide the headers only after the table is displayed.

Answering your second question, you can use the following approach:

table.setPlaceholder(new Label("Placeholder"));

Node.

+6

Source: https://habr.com/ru/post/1535552/


All Articles