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 213356

Summary: NullPointerException at org.netbeans.modules.form.layoutdesign.LayoutModel.areComponentsLinkSized
Product: guibuilder Reporter: MackSix
Component: CodeAssignee: issues@guibuilder <issues>
Status: NEW ---    
Severity: normal CC: MackSix, tim_sa
Priority: P3    
Version: 7.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 188777
Attachments: stacktrace
stacktrace

Description MackSix 2012-06-01 03:58:57 UTC
This bug was originally marked as duplicate of bug 186548, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201205300001)
VM: Java HotSpot(TM) Client VM, 23.0-b21, Java(TM) SE Runtime Environment, 1.7.0_04-b20
OS: Windows Vista

User Comments:
tim_sa: selected customize code

MackSix: Repeatable.

MackSix: Dragged a JCheckBox into a menu bar and it took and showed as a collapsed pimple on the lower left corner of menu bar. I then right clicked on it in the Navigator to bring up the menu to delete it and this Exception was thrown.

GUEST: Trying to put an horizontalglue to a menu so that the help menu keeps aligned on the right.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.form.layoutdesign.LayoutModel.areComponentsLinkSized(LayoutModel.java:1350)
   at org.netbeans.modules.form.actions.ChooseSameSizeAction.createSameSizeSubmenu(ChooseSameSizeAction.java:153)
   at org.netbeans.modules.form.actions.ChooseSameSizeAction.access$000(ChooseSameSizeAction.java:73)
   at org.netbeans.modules.form.actions.ChooseSameSizeAction$1.menuSelected(ChooseSameSizeAction.java:115)
   at javax.swing.JMenu.fireMenuSelected(JMenu.java:1043)
   at javax.swing.JMenu$MenuChangeListener.stateChanged(JMenu.java:1122)
Comment 1 MackSix 2012-06-01 03:59:03 UTC
Created attachment 120173 [details]
stacktrace
Comment 2 MackSix 2012-06-01 04:25:09 UTC
Created attachment 120175 [details]
stacktrace

Designer allows you to put just about any component on a JMenuBar and this is thrown if you bring up the context menu on it in Navigator and move mouse cursor across the menu.
Comment 3 Exceptions Reporter 2012-09-14 20:29:14 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=188777