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.
Summary: | NullPointerException at org.netbeans.modules.form.HandleLayer.shouldHighlightPanel | ||
---|---|---|---|
Product: | guibuilder | Reporter: | Exceptions Reporter <exceptions_reporter> |
Component: | Code | Assignee: | issues@guibuilder <issues> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mmirilovic |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 38867 |
Attachments: |
stacktrace
Test-case |
Description
Exceptions Reporter
2011-11-07 09:52:13 UTC
Created attachment 112909 [details]
stacktrace
Too old, last report from 6.9.1 The exception is thrown on the following line: if (realParent.getSize().equals(realPanel.getSize()) && realPanel.getLocation().equals(new Point(0,0))) { i.e., realPanel or realParent is null. My guess is that realParent is null. In other words, there is some component that * is replicated * is not top-design component * has parent * its parent is not replicated It probably cannot happen in normal component hierarchy, but it can happen when some component is displayed in another component as a result of property setting. Steps to reproduce (in NetBeans 7.0.1) 1. Create Java Desktop application. 2. Add JPanel into mainPanel of the view form. 3. Select [FrameView] and change its component property to jPanel1. 4. Save the form, close it adn reopen it. 5. Move mouse cursor over the central area of the form => the exception is thrown. Created attachment 112924 [details]
Test-case
This bug is not specific to Java Desktop application. I am attaching a standalone test-case.
Steps to reproduce:
1. Open the attached project.
2. Build the project.
3. Open PanelForm.
4. Select problematicComponent.
5. Change value of its 'component' property to 'component'.
6. Move mouse over the problematicComponent
=> the exception is thrown.
Fixed. Modified file: http://hg.netbeans.org/jet-main/rev/3a27e136d39c |