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 213123 - NullPointerException at org.netbeans.modules.form.layoutdesign.LayoutInterval.contentWantResize
Summary: NullPointerException at org.netbeans.modules.form.layoutdesign.LayoutInterval...
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Natural Layout (show other bugs)
Version: 7.2
Hardware: All All
: P1 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
: 212971 213655 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-05-28 21:00 UTC by MackSix
Modified: 2012-06-08 06:06 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 188520


Attachments
stacktrace (4.59 KB, text/plain)
2012-05-28 21:00 UTC, MackSix
Details
Project to use for reproduction. (112.92 KB, application/zip)
2012-05-28 21:12 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2012-05-28 21:00:17 UTC
Build: NetBeans IDE Dev (Build 201205280002)
VM: Java HotSpot(TM) Client VM, 23.0-b21, Java(TM) SE Runtime Environment, 1.7.0_04-b20
OS: Windows Vista

User Comments:
MackSix: Tried to Copy some AWT components from container to a JFrame in Navigator. This happend when I selected the "Paste" command from the JFrame contect menu in Navigator.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.form.layoutdesign.LayoutInterval.contentWantResize(LayoutInterval.java:967)
   at org.netbeans.modules.form.layoutdesign.LayoutPosition.isFixedRelativePosition(LayoutPosition.java:725)
   at org.netbeans.modules.form.layoutdesign.LayoutPosition.getSequentialPosition(LayoutPosition.java:602)
   at org.netbeans.modules.form.layoutdesign.LayoutPosition.getOriginalPosition(LayoutPosition.java:209)
   at org.netbeans.modules.form.layoutdesign.LayoutFeeder.<init>(LayoutFeeder.java:126)
   at org.netbeans.modules.form.layoutdesign.LayoutDesigner.createFeeder(LayoutDesigner.java:958)
Comment 1 MackSix 2012-05-28 21:00:22 UTC
Created attachment 119966 [details]
stacktrace
Comment 2 MackSix 2012-05-28 21:12:46 UTC
Created attachment 119967 [details]
Project to use for reproduction.

1) Open attached project.
2) Open MyForm.java and MyJFrame.java
3) In Navigator, select button1, canvas1, checkbox1 and label1.
4) Raise context menu and choose "Copy".
5) Switch to MyJFrame and to paste components with JFrame context menu within Navigator.

This Exception happens.

Apparently this happens when trying to copy and paste more than 1 AWT or Swing component from one container to the other. Setting P1
Comment 3 Jan Stola 2012-05-31 15:27:18 UTC
Reproducible - it happens whenever you copy more than 2 components in Free Design. No need to use Inspector/Navigator or two forms - it happens when you copy directly in the designer (and within one form/container) as well.
Comment 4 Tomas Pavek 2012-06-05 10:11:45 UTC
Fixed.
http://hg.netbeans.org/jet-main/rev/49adfa721535
Comment 5 Tomas Pavek 2012-06-05 14:20:54 UTC
*** Bug 212971 has been marked as a duplicate of this bug. ***
Comment 6 Tomas Pavek 2012-06-06 14:25:07 UTC
*** Bug 213655 has been marked as a duplicate of this bug. ***
Comment 7 Quality Engineering 2012-06-08 06:06:20 UTC
Integrated into 'main-golden', will be available in build *201206080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/49adfa721535
User: Tomas Pavek <tpavek@netbeans.org>
Log: #213123: don't try to compute original position for components that are not placed in the target container (moved or resized within the container)