8145284: [Documentation] [TextField] Missing new line character handling
authorarapte
Mon, 30 May 2016 16:04:40 +0530
changeset 39012 10d463f0d47a
parent 39011 6649a38574b0
child 39013 d6a023d500ef
8145284: [Documentation] [TextField] Missing new line character handling Reviewed-by: psadhukhan, serb
jdk/src/java.desktop/share/classes/java/awt/TextField.java
--- a/jdk/src/java.desktop/share/classes/java/awt/TextField.java	Mon May 30 12:43:18 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/java/awt/TextField.java	Mon May 30 16:04:40 2016 +0530
@@ -159,6 +159,8 @@
      * @param      text       the text to be displayed. If
      *             {@code text} is {@code null}, the empty
      *             string {@code ""} will be displayed.
+     *             If {@code text} contains EOL character, then
+     *             it will be replaced by space character.
      * @exception HeadlessException if GraphicsEnvironment.isHeadless()
      * returns true.
      * @see java.awt.GraphicsEnvironment#isHeadless
@@ -190,6 +192,8 @@
      * @param      text       the text to be displayed. If
      *             {@code text} is {@code null}, the empty
      *             string {@code ""} will be displayed.
+     *             If {@code text} contains EOL character, then
+     *             it will be replaced by space character.
      * @param      columns     the number of columns.  If
      *             {@code columns} is less than {@code 0},
      *             {@code columns} is set to {@code 0}.
@@ -293,7 +297,11 @@
     /**
      * Sets the text that is presented by this
      * text component to be the specified text.
-     * @param       t   the new text.
+     * @param      t       the new text. If
+     *             {@code t} is {@code null}, the empty
+     *             string {@code ""} will be displayed.
+     *             If {@code t} contains EOL character, then
+     *             it will be replaced by space character.
      * @see         java.awt.TextComponent#getText
      */
     public void setText(String t) {