Win32 java.awt.print.PrinterJob.printDialog() blocks

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 1.4.2
    • Component/s: client-libs
    • None
    • x86
    • windows_nt



      Name: ssR10077 Date: 10/11/2002

      ###@###.###
      If java.awt.print.PrinterJob.printDialog() is called on EDT, it is blocked
      preventing dispatching PaintEvent and repainting of LightWeight components.
      The following test demonstrates it. If the PaintEvent would be dispatched
      the frame shall be red.

      import java.awt.*;
      import java.awt.print.*;

      public class PrintTest extends Frame {
             public PrintTest() {
                 setSize(500, 500);
                 setVisible(true);

                  EventQueue.invokeLater(
                      new Runnable() {
                          public void run() {
                              PrinterJob job = PrinterJob.getPrinterJob();
                               job.printDialog();
                          }
                     }
                 );
           }

          public void paint(Graphics g) {
             super.paint(g);
             g.setColor(Color.RED);
             g.fillRect(0, 0, getWidth(), getHeight());
          }

          public static void main(String ars[]) {
             PrintTest test = new PrintTest();
          }
      }

      ======================================================================

            Assignee:
            Ssi Ssi (Inactive)
            Reporter:
            Ssi Ssi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: