Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8128461

Exception when the user attempts to type into a TextField where the text property is bound

    Details

      Description

      public class HelloTextField extends Application {
          @Override public void start(Stage stage) throws Exception {
              TextField a = new TextField();
              a.setPromptText("Enter text here");

              TextField b = new TextField();
              b.textProperty().bind(a.textProperty());

              TextField c = new TextField();
              c.setPromptText("This box and the next one are bidirectionally bound");

              TextField d = new TextField();
              d.setPromptText("This box and the previous one are bidirectionally bound");
              c.textProperty().bindBidirectional(d.textProperty());

              VBox box = new VBox(5);
              box.getChildren().addAll(a, b, c, d);
              stage.setScene(new Scene(box, 500, 500));
              stage.show();
          }

          public static void main(String[] args) {
              launch(args);
          }
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rbair Richard Bair
                Reporter:
                rbair Richard Bair
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: