ahmad faraz ahmad faraz - 1 month ago 19x
Java Question

Change ListView font size in JavaFX

I want to know how can I change the list view items text font size in JavaFx. The size of each row text will vary . I tried using cell factor property but i don't know how to use it. Can anybody help me here ?


In javaFx you can use css to style different objects. It depends on the object in your list view but it would go something like this.

ListView<Hyperlink> listview = ..

            ObservableList<Hyperlink> lists = listview.getItems();

            for(Hyperlink link:lists)