JavaFX CSS parser error Expected COLUMN

so I got an error and I don't know what to fix cuz from my point of view everything is fine there:

CSS code:

@font-face {
    font-family: 'Titillium';
    font-style: normal;
    font-weight: normal;
    src: url('Titillium.ttf');

    -fx-font-family: "Titillium";

    -fx-font-size: 14pt;

.title {
    -fx-font-size: 24pt;

    -fx-font-size: 15pt;

    -fx-font-size: 15pt;

    -fx-font-size: 12pt;

#detaillist .list-cell{
    -fx-background-color: transparent;

    -fx-font-size: 10pt;


and Java code where I installed Sytle:

title = new Label("Notiz vom " + Selector.getSelectedNotiz().getDatum().toLocaleString());
//--------------- Right here ----------------------
cmbLernender = new ComboBox<String>();
k = new Label("Kompetenz");


it looks great ...

now if i start this happens:

Sep 15, 2014 1:25:30 PM com.sun.javafx.css.parser.CSSParser declaration
WARNUNG: CSS Error parsing '*{title}: Expected COLON at [1,7]


thanks for the help.



source to share

1 answer

You are trying to set the title styleclass

to Label

. If you want to install styleclass




If you want to add styles directly to your control, instead of loading them from the css / styleclass, you can use:

title.setStyle("-fx-background-color: slateblue; -fx-text-fill: white;");




All Articles