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.
NetBeans IDE Dev (Build 070402) 1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105 Windows XP version 5.1 running on x86 en_GB (nb); Cp1252 Description: ============= Have JFrame with JMenuBar. Then move one of the JMenus from menubar to somewhere else in JFrame StackTrace: =========== java.lang.AssertionError at org.netbeans.modules.form.layoutdesign.LayoutDesigner.endMoving(LayoutDesigner.java:706) at org.netbeans.modules.form.HandleLayer$ExistingComponentDrag.end(HandleLayer.java:2286) at org.netbeans.modules.form.HandleLayer$ComponentDrag.end(HandleLayer.java:2081) at org.netbeans.modules.form.HandleLayer.endDragging(HandleLayer.java:882) at org.netbeans.modules.form.HandleLayer.mouseReleased(HandleLayer.java:1432)
Created attachment 40265 [details] 99699
Created attachment 40268 [details] the first stack trace is wrong, pls use this one
This is caused when moving a menu from a menu-capable container (like a menu bar) to a non-menu capable container (like a jpanel). I have changed the code to detect this and properly end the drag operation without doing a move.
Now no exception is thrown but I think, behavior of moved jmenu from menu-capable container should be solved in different way - exactly menu should be moved to other components as it is e.g. when controls are drag from container and moved to white space around form. One of the possible reason, why to do it, is that user can set actions, text and so on to menu and don't want to display it right now in menu bar, so he easily moves it to other components and then use is later.
Moving components temporarily to the whitespace around the form is an interesting idea. We will need to add that to the menu designer spec. Since the main bug is fixed I'm going to reduce this to a P4 Enhancement.