I have the following FXML:
<VBox id="customerFormPane" styleClass="customerForm" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.customer.CustomerFormController" >
<stylesheets>
<URL value="@customerform.css"/>
</stylesheets>
<GridPane>
<columnConstraints>
<ColumnConstraints hgrow="ALWAYS" percentWidth="50.0"/>
<ColumnConstraints hgrow="ALWAYS" percentWidth="50.0"/>
</columnConstraints>
<ImageView id="boxImage" fitWidth="100" fitHeight="100">
<image>
<Image url="@/com/exmaple/resources/icons/office.png" />
</image>
</ImageView>
</GridPane>
</VBox>
I would like to define a border in CSS for the Image. I have tried this in customerform.css file:
.customerForm Image, .customerForm ImageView, .customerForm image {
-fx-background-color: white;
-fx-border-style: solid;
-fx-border-color: red;
}
But nothing happens, any tip on how to select the ImageView? (Note: the image is displayed correctly)