promptText on TextArea ignores line breaks

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P5
    • tbd
    • Affects Version/s: 8u40
    • Component/s: javafx

      Newlines in promptText are ignored.

      Since the texarea ist a multiline input the prompt text should also support that.

      Workaround: use \r instead of \n

      Example:
      {code}
      public class Test extends Application {

          @Override
          public void start(Stage primaryStage) throws Exception {
              TextArea textArea = new TextArea();
              textArea.setPromptText("11111111\n2222222\n33333333");
              primaryStage.setScene(new Scene(textArea, 300, 250));
              primaryStage.show();;
          }

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

            Assignee:
            Unassigned
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported: