-
Backport
-
Resolution: Fixed
-
P4
-
None
-
None
-
b01
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.
###@###.### 2004-12-03 08:07:57 GMT
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.
###@###.### 2004-12-03 08:07:57 GMT
- backport of
-
JDK-4930594 UnixPrintServiceLookup should not require file permission
- Resolved
- relates to
-
JDK-4673221 printDialog freezes when handling large list of printers in java 1.4
- Resolved
-
JDK-6199984 Printing from Java Applet fails in JRE 142_04 on Solaris/Netscape
- Closed