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

JTextArea not honoring line-wrap, editable and enable properties when printing it

XMLWordPrintable

    • b78
    • generic
    • generic
    • Verified

      I have a JTextArea set with line-wrap property, added to a JFrame. I am adding some text to it and the text is getting line-wrapped properly on the screen. I am printing the contents of the JTextArea on clicking a button, by calling JTextArea.print(). I expect the text in the print-out to be wrapped according to the size of the paper. But the actual print out is not wrapped at all and only the first line is printed to the size of the paper and rest of the text is cut-off.

      Similarly, JTextArea is not honoring some of the other properties such as Editability and Disabled states when printing it.

      This is reproducible on Mustang-b69 on all platforms.

      I have attached a sample test. Execute the sample test. You would see a frame with a JTextArea and a couple of buttons. Enter some text in JTextArea and click the 'Print TA' button. Click OK on the print dialog. Check whether the text printed is getting line-wrapped according to the paper size. If not, the bug is reproduced.

            idk Igor Kushnirskiy (Inactive)
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: