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 - Code working in Netbeans 6.1 using JDK 1.6 but fails in jdk 1.5.0_14
Summary: Code working in Netbeans 6.1 using JDK 1.6 but fails in jdk 1.5.0_14
Status: RESOLVED DUPLICATE of bug 133092
Alias: None
Product: platform
Classification: Unclassified
Component: Module System (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-22 12:12 UTC by runa
Modified: 2008-12-22 10:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot (35.30 KB, text/plain)
2008-05-22 12:16 UTC, runa
Details
Project (78.68 KB, text/plain)
2008-05-22 12:16 UTC, runa
Details

Note You need to log in before you can comment on or make changes to this bug.
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 ***