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

JTextField.print wastes hundreds of pages

    Details

    • Subcomponent:
    • Resolved In Build:
      b70
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      I have a JTextField with some text in it and I am calling JTextField.print() on clicking a button. A dialog pops up. Fortunately I am choosing 'PrintToFile' and clicking 'Print' button on the dialog. Printing goes into infinite loop and the page count in the interactive dialog is incrementing indefinitely. Looks like the Printable implementation is not returning NO_SUCH_PAGE appropriately and it always returns PAGE_EXISTS.

      This is noticed on all mustang builds, on SolSparc as well as Win32. This is a bug in the new feature which is very critical especially when the user attempts to print the JTextField in background where no dialogs are shown. This would go into infinite loop and if printing to printer, it may just blow up the cartridge. No convenient workaround. Fix necessary for RC.

      I have attached a sample test. Execute the sample test. Click on the print button. A print dialog will pop up. Choose 'PrintToFile' option and click ok (otherwise you will end up wasting lot of papers). If the application keeps on printing 1000s of pages, bug is reproduced.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: