Can you try:
System.out.println(label);
it should print something like
Label@1858c80c [styleClass=label]
Is your css class print too after styleclass = label ...?
Or you can remove the css tag class and try to set the shortcut style in the code directly:
label.setStyle("-fx-border-color: white;");
if you see the changes, you may inadvertently override the css class definition in the css file. Check it out.
source share