Search code examples
csstableviewjavafx-2textcolor

JavaFX 2 TableView header font color


How can I change the text color of the TableView component's header?

I tired this:

.table-view .column-header, .table-view .filler {
    -fx-text-fill: white;
    -fx-border-width: 0, 0;
    -fx-font-size: 12px;
}

This remove the border, and also change the font size, but not the font color.


Solution

  • Something like this might work.

    .table-view .column-header .label {
        -fx-text-fill: white;
        -fx-font-weight: bold;
    }