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

When prefColumnsCount changes, the text field should request layout so the LM will resize it

    Details

      Description

      In the following test, if you enter a number and hit enter in the bottom text box, the top text box should resize to match.


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

              final TextField d = new TextField();
              d.setOnAction(new EventHandler<ActionEvent>() {
                  @Override public void handle(ActionEvent event) {
                      a.setPrefColumnCount(Integer.valueOf(d.getText()));
                  }
              });

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

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

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: