So, I am having trouble getting CSS-styling to work in my JavaFX-project.
I have added an external stylesheet with:
scene.getStylesheets().add("Style.css");
... which links to the file Style.css in the same folder:
.root{
-fx-background-color: #000000;
}
.button {
-fx-background-color: #AB4642;
}
However, no changes occur when I run the program. The buttons stay the same, and the background stays the same. I have tried assigning unique classes to button and styling them that way, but that doesn't help.
How do I get the styling to actually work? How do I add an external CSS-file to the JavaFX-project?