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

Printing from Java Applet fails in JRE 142_04 on Solaris/Netscape

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.4.2_04
    • Fix Version/s: None
    • Component/s: deploy
    • Labels:
      None
    • Subcomponent:
    • CPU:
      generic
    • OS:
      solaris_9

      Description

      From an Applet, trying to do a print using PrintJob.getGraphics() returns 'null'. This happens in Solaris and not in Windows. The same code works fine when running as Application on Solaris.

      Code snippet:
        //Inside an action handler of a Frame created from Applet
        PrintJob pj = getToolkit().getPrintJob(this, "Test Print", null);
        if(pj == null) return;
        Graphics g = pj.getGraphics(); // <== NULL

      Testcase is in the attachment of this bug. Open the demoDefault.html in Netscape browser on Solaris. Click on the Print button from the Frame, which brings up 'Confirmation Needed - Print' dialog (for the 1st time). Click the Yes button to continue, which brings up the 'Print' dialog. Click the OK button to print. Open the Java Console and see java.lang.NullPointerException being thrown.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sthilagasunw Sathianantha Thilagar (Inactive)
              Reporter:
              duke J. Duke (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: