I'm actually trying to use CSS with JavaFx and i'm getting an error. I've created the CSS file(style.css) and now trying to add the file to the fxml file through stylesheets and i am getting this error below
com.sun.javafx.css.StyleManager loadStylesheetUnPrivileged WARNING: Resource "@style.css" not found.
This is the FXML file with the code below
<GridPane fx:controller="sample.Controller"
xmlns:fx="http://javafx.com/fxml" alignment="center" hgap="10" vgap="10"
stylesheets="@style.css">
<Button text="Button One" GridPane.rowIndex="0" GridPane.columnIndex="0"/>
<Button text="Button Two" GridPane.rowIndex="0" GridPane.columnIndex="2"/>
<Button text="Button Three" GridPane.rowIndex="0" GridPane.columnIndex="3"/>
<Button text="Button Four" GridPane.rowIndex="0" GridPane.columnIndex="4"/>
<Button text="Button Five" GridPane.rowIndex="0" GridPane.columnIndex="5"/>
</GridPane>
I don't know if i need to add a path or a jar file somewhere. I just please need somebody's help to fix this so that i can continue with my learning. Thanks so much. I really appreciate.