JavaFX 2 TableView header font color

Lakatos Gyula picture Lakatos Gyula · Dec 30, 2012 · Viewed 20.7k times · Source

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.

Answer

ytw picture ytw · Jan 3, 2013

Something like this might work.

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