I am using an external css file called mainBut.css
to align the text of a JavaFX button,
Code for the button:
<Button fx:id="hostelBut"
layoutX="7.0"
layoutY="100.0"
onAction="#hostelAction"
prefHeight="30.0"
prefWidth="150.0"
styleClass="mainBut"
stylesheets="@../resources/css/mainBut.css"
text="Hostel">
File mainBut.css
.mainBut {
-fx-background-color: #fdfdfd;
-fx-alignment: LEFT;
-fx-border-color: #bdc3c7;
}
When I compile this file and run it through NetBeans, I get the following warning.
WARNING: Caught java.lang.IllegalArgumentException: No enum constant javafx.geometry.Pos.LEFT' while calculating value for '-fx-alignment' from rule '*.mainBut' in stylesheet jar:file...
What can I do to fix this warning?
source
share