-1

This is a simplified version of my case.

Layout

  1. A choice box with 3 options.
  2. A textarea T1
  3. An input text field.
  4. A textarea t2

Expectation

  1. When the user clicks on an option the selected option is displayed in the T1 instantly.
  2. T2 displays instantly what's currently present in input text field.

Implementation so far

  1. I added a method for onKeyTyped for the text field and #2 works.
  2. I added a method for onMouseClicked for the choice box. #2 doesn't work instantly. It takes another click on the choice box or key press on the text field to display the new value in T1. I also tried onAction and that too didn't work.

1 Answers1

-3

For java

inputTextField.focusProperty((observable, oldValue, newValue) - > {
    if(newValue) t1.setText(inputField.getText());
});
Sergey
  • 16
  • 2