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

PIT: Showing Print/Page dialog throws CCE

XMLWordPrintable

    • b02
    • x86
    • windows_xp
    • Verified

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

              vikram Vikram Aroskar (Inactive)
              gramachasunw Girish Ramachandran (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: