This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 135592

Summary: Code working in Netbeans 6.1 using JDK 1.6 but fails in jdk 1.5.0_14
Product: platform Reporter: runa <runa>
Component: Module SystemAssignee: Jesse Glick <jglick>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Screenshot
Project

Description runa 2008-05-22 12:12:14 UTC
Entering this for external customer from the Sun Developer Expert Assistance
program:

Reproducible in Netbeans 6.1

The customer is referring to the Sample Paint application under Netbeans Module.

In the NewCanvasAction.java, he's adding the below code snippet

 public void performAction() {
        
        PrinterJob pj = PrinterJob.getPrinterJob();
        pj.printDialog();

The customer is using - JDK 1.5.0_14.
Run the application.
From Paint Application, select File -> New Canvas (Select New Canvas)
We get to see the following exception:

java.lang.NullPointerException: null pData
        at sun.awt.windows.WComponentPeer.nativeHandleEvent(Native Method)
        at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:262)
        at java.awt.Component.dispatchEventImpl(Component.java:4060)

But we found that there is no issue when we use JDK 1.6
Comment 1 runa 2008-05-22 12:16:07 UTC
Created attachment 61752 [details]
Screenshot
Comment 2 runa 2008-05-22 12:16:55 UTC
Created attachment 61753 [details]
Project
Comment 3 Lukas Hasik 2008-05-22 12:29:45 UTC
please look at the duplicate issue for more details. It is JDK bug.

*** This issue has been marked as a duplicate of 133092 ***