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

REGRESSION: Cancelling the "file name dialog" results in PrinterException with the message "T"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 6
    • client-libs
    • 2d
    • beta
    • x86
    • windows_xp

      On my system, I print to postscript files via a postscript printer that I've configured to print to file. I've set this up by installing the driver for Apple LaserWriter 16/600 PS and set it to print to port FILE.

      Using this printer, I get an exception under certain circumstances. To see this, configure a printer to print to file and try SwingSet2.

      - When it loads, change to the table demo.
      - Hit the Print button.
      - Select your "file" printer and hit print (do not check the "Print to file" checkbox).
      - When the native dialog appears asking you to enter the output file name, hit cancel.
      - SwingSet2 displays a Printing Failed dialog with the message "T". This "T" message is the result of calling getMessage() on a PrinterException that is thrown as a result of cancelling the dialog. Changing TableDemo.java to print the stack trace for the exception gives the following trace:

      java.awt.print.PrinterException: T
              at sun.awt.windows.WPrinterJob._startDoc(Native Method)
              at sun.awt.windows.WPrinterJob.startDoc(WPrinterJob.java:1169)
              at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1325)
              at javax.swing.JTable$8.run(JTable.java:4990)
              at java.lang.Thread.run(Thread.java:595)

      This is a regression in Mustang. In 1.5.0, no exception is thrown.
      ###@###.### 2005-03-28 20:59:11 GMT

            jgodinez Jennifer Godinez (Inactive)
            shickeysunw Shannon Hickey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: