Showing a Print or Page dialog thows ClassCastException.
This is seen only with 6u18 b02 PIT build, not with b01.
Exception:
Exception in thread "main" java.lang.ClassCastException: sun.awt.windows.WPrintDialogPeer cannot be cast to java.awt.peer.DialogPeer
at java.awt.Dialog.blockWindows(Dialog.java:1552)
at java.awt.Dialog.modalShow(Dialog.java:1442)
at java.awt.Dialog.conditionalShow(Dialog.java:903)
at java.awt.Dialog.show(Dialog.java:1035)
at java.awt.Component.show(Component.java:1563)
at java.awt.Component.setVisible(Component.java:1515)
at java.awt.Window.setVisible(Window.java:842)
at java.awt.Dialog.setVisible(Dialog.java:986)
at sun.awt.windows.WPrinterJob.displayNativeDialog(WPrinterJob.java:441)
at sun.awt.windows.WPrinterJob.printDialog(WPrinterJob.java:532)
Testcase:
public class Test {
public static void main(String[] args) {
PrinterJob.getPrinterJob().printDialog();
//PrinterJob.getPrinterJob().pageDialog(new PageFormat());
}
}