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

PasswordField doesn't work properly with multiline text.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: fx2.0
    • Fix Version/s: None
    • Component/s: javafx
    • Environment:

      java6
      fx b41
      windows 7

      Description

      To reproduce run following code

      Expected: "Enter password SecondLine Third line" as prompt

      import javafx.application.Application;
      import javafx.scene.Parent;
      import javafx.scene.Scene;
      import javafx.scene.control.PasswordField;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;

      public class PasswordBoxSample extends Application {

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

          private Parent getContent() {

              VBox list = new VBox();
              PasswordField box = new PasswordField();
              box.setPromptText("Enter password\nSecondLine\nThird line");
              
              list.getChildren().addAll(box);
              return list;
          }

          public void start(Stage stage) {
              stage.setX(100);
              stage.setY(100);
              Scene scene = new Scene(getContent());
              stage.setScene(scene);
              stage.show();
          }
      }

        Attachments

          Activity

            People

            • Assignee:
              gkbrown Greg Brown (Inactive)
              Reporter:
              anazarov Andrey Nazarov
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: