Hello Stackeroverflowers,
i'd like to ask how can i change a RadioButton Dot? I need to define 3 RadioButtons with 3 different Colors to show a state. Do i have to work with Css? Would be perfect if anyone could tell me how can i realize that ?
A Example would be:
@FXML
public RadioButton redState = new RadioButton();
.
.
.
redState.setDotColor(red);
or in Fxml to define the Color static:
style="-fx-dot-color: rgb(255,0,0);"
I hope everyone understood my Plan. It's only about colorize the Dot in a javafx RadioButton.
I'm thankfull for every Answer.
I haven't tested this, but try
redState.getStyleClass().add("red-radio-button");
(or do this in FXML if you prefer).
And then in an external css file
.red-radio-button .dot {
-fx-mark-highlight-color: red ;
-fx-mark-color: red ;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With