Set multiple styleClass values

John Kugelman picture John Kugelman · Aug 29, 2014 · Viewed 8.9k times · Source

How does one set two classes on a node in a JavaFX FXML file?

<VBox styleClass="notice high">

This adds one value "notice high" instead of two values "notice" and "high". How can I add two values?

Answer

tomsontom picture tomsontom · Aug 29, 2014

"Primitive type" lists can be seperated by ',' inside an attribute

<VBox xmlns:fx="http://javafx.com/fxml/1" styleClass="a, b">