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 186772

Summary: NullPointerException at org.netbeans.modules.form.layoutdesign.LayoutOperations.mergeParallelGroups
Product: guibuilder Reporter: ekenschaft
Component: CodeAssignee: issues@guibuilder <issues>
Status: VERIFIED FIXED    
Severity: normal CC: asenk, dkonecny, falven, ljnelson, mholste, rgarske, rojanu
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 170172
Bug Depends on:    
Bug Blocks: 136425    
Attachments: stacktrace
stacktrace
stacktrace

Description ekenschaft 2010-05-26 21:41:48 UTC
This bug was originally marked as duplicate of bug 145894, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 6.9 Beta (Build 201004200117)
VM: Java HotSpot(TM) Client VM, 16.3-b01, Java(TM) SE Runtime Environment, 1.6.0_20-b02
OS: Windows Vista

User Comments:
GUEST: moving around some components in the gui-builder

GUEST: estaba acomodando un JLabel an la esquina inferior derecha utilizando como layout el free design

GUEST: ....

GUEST: Move a component

rgarske: trying to reposition a group of checkboxes on a JDialogs contentpane.

GUEST: Moving swing components

rojanu: Drag N Drop use on multiple selected JLabels and JTextFields

ljnelson: Dragging things around somewhat recklessly in Matisse.

ekenschaft: Dragged group of check boxes

GUEST: goddamn just dragged few elements down..




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.form.layoutdesign.LayoutOperations.mergeParallelGroups(LayoutOperations.java:358)
   at org.netbeans.modules.form.layoutdesign.LayoutFeeder.addInterval(LayoutFeeder.java:805)
   at org.netbeans.modules.form.layoutdesign.LayoutFeeder.add(LayoutFeeder.java:311)
   at org.netbeans.modules.form.layoutdesign.LayoutDesigner.addComponents(LayoutDesigner.java:825)
   at org.netbeans.modules.form.layoutdesign.LayoutDesigner.endMoving(LayoutDesigner.java:750)
   at org.netbeans.modules.form.HandleLayer$ExistingComponentDrag.end(HandleLayer.java:2699)
Comment 1 ekenschaft 2010-05-26 21:41:53 UTC
Created attachment 99517 [details]
stacktrace
Comment 2 David Konecny 2010-11-18 00:30:24 UTC
Created attachment 103052 [details]
stacktrace

I was dragging to elements and dropped them in the middle of existing form
Comment 3 Tomas Pavek 2011-02-02 17:15:42 UTC
Don't how to reproduce, but from the exception and looking at the code it seems clear what is wrong and what needs to be fixed. Much likely happens when moving multiple components at once -- their common group can get eliminated (removed) when inserted to the target place, so when in the end trying to perform mergeParallelGroups on the group's parent, it has no parent anymore.
Comment 4 asenk 2011-06-13 11:33:00 UTC
Created attachment 108876 [details]
stacktrace

1.Start IDE with clean user dir
2. Create new JSE project and add JFrame Form into it
3. Add 3raadio buttons and one checkbox and some other Swing components 
4. Select these 3 radio buttons and a checkbox
5. Move them
Comment 5 asenk 2011-10-05 09:39:26 UTC
Fixed in 7.1 - Free Design improvements
Comment 6 asenk 2011-10-05 09:40:03 UTC
Product Version: NetBeans IDE Dev (Build 201110040601)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Linux version 2.6.38-11-generic running on i386; UTF-8; en_US (nb)