How do I make a select event for radioButton
be started by default?
I have determined that my radios buttons
will call some methods when selected, I did within initialize
, however, in the way that this, I have to click on the radio for it to execute, as I do, so that it already trigger the event? I already tried to give radio01.setSelected(true);
but it only marks the radius and does not trigger the event.
public void initialize(URL location, ResourceBundle resources) {
fisica.setSelected(true);
radio01.selectedProperty().addListener((p, ov, nv) -> {
//metódos
});
radio02.selectedProperty().addListener((p, ov, nv) -> {
//metódos
});
}