I would like to know which event when exiting the object TextField
of JavaFx
, changes a value of another object.
if (textFieldC1.getText().equals("50")) {
slider1.setValue(Double.valueOf(textFieldC1.getText()));
}
I would like to know which event when exiting the object TextField
of JavaFx
, changes a value of another object.
if (textFieldC1.getText().equals("50")) {
slider1.setValue(Double.valueOf(textFieldC1.getText()));
}
Try this way:
textFieldC1.setOnAction( (ActionEvent e)-> {
if(textFieldC1.getText().equals("50")) {
slider1.setValue(Double.valueOf(textFieldC1.getText()))
} });