Textfield Javafx catching the event

Asked

Viewed 461 times

0

I would like to know which event that when leaving the object TextField of JavaFx, changes a value of another object.

if (textFieldC1.getText().equals("50")) {
    slider1.setValue(Double.valueOf(textFieldC1.getText()));
}
  • Try with Focus: http://stackoverflow.com/questions/16549296/how-perform-task-on-javafx-textfield-at-onfocus-and-outfocus

  • Didn’t solve Jerfesson Assis

1 answer

0


Try it that way:

textFieldC1.setOnAction( (ActionEvent e)-> {
 if(textFieldC1.getText().equals("50")) {
     slider1.setValue(Double.valueOf(textFieldC1.getText()))
 } });
  • Thank you very much. God bless you!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.