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

promptText on TextArea ignores line breaks

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P5 P5
    • tbd
    • 8u40
    • 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}

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

              Created:
              Updated:
              Imported: