ahmad faraz ahmad faraz - 1 year ago 320
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 ?

Answer Source

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)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download