Issue
How can i change the color of the small arrow in the JavaFX Spinner not the entire button-arrow just the small arrow inside the button?
Is there any library for JavaFX Spinner like JFoenix ?
Solution
The best way to do this would be with CSS. And when it comes to CSS with JavaFX it helps to read the JavaFX CSS Reference Guide which tells you the styleclasses and substructures of various JavaFX nodes.
In this case, you can do:
.spinner .increment-arrow-button .increment-arrow {
-fx-background-color: red;
}
.spinner .decrement-arrow-button .decrement-arrow {
-fx-background-color: red;
}
Then add the stylesheet to the Scene
that the Spinner
belongs to. This will change the arrows (which are Region
s) to have a background with the color red.
Answered By - Slaw
Answer Checked By - Willingham (JavaFixing Volunteer)