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();
}
}
======================================================================