Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaFx :Default Message for Empty ListView

When there is no record in any table it shows a message 'No content in table', which is by default functionality of TableView in JavaFx.

So here my question is, does the same can be possible with ListView in JavaFx ? Like, if there is no item in any ListView then it will show a message same as TableView, instead of a blank/empty fields.

like image 582
Shreyas Dave Avatar asked Dec 09 '13 11:12

Shreyas Dave


1 Answers

You have to try this:-

listView.setPlaceholder(new Label("No Content In List"));

its 100% working....

like image 183
Vikas Tiwari Avatar answered Sep 24 '22 02:09

Vikas Tiwari