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 200705081800) 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: ============= jdk enables to add object of type "Component" in JMenu but in form there seems to be forbidden. It's not possible to insert it from inspector (popup - add from palette) and also directly from palette by drag and drop. But if e.g button is firstly inserted somewhere in layout and then moved by mouse in menu in design, then button is finally added in appropriate submenu without any problem. Result of this action is that if frame is reopen, user is warmed that frame is damaged. Steps which cause that many exceptions are thrown and IDE must be restarted 1. create jframe and insert jMenuBar (have simple java project) 2. insert jButton somewhere in layout 3. move jButton to menu - drag it and move above one of two menus in menubar 4. insert another jMenu (jMenu3) in the same submenu as jButton is 5. invoke custom editor of action for jMenu3 (custom editor is simple) 6. select "using editor" - Value from existing component 7. check radio button Property and set e.g jMenu1.action 8. save and reopen your jFrame See form is damaged. 9. push view only and click on jMenu3 in design and an exception occurs Than this exception occurs all the time and some time IDE gets stuck and must be killed StackTrace: =========== java.lang.AssertionError at org.netbeans.modules.java.source.usages.RepositoryUpdater.getClassPathEntry(RepositoryUpdater.java:2479) at org.netbeans.modules.java.source.usages.RepositoryUpdater.access$3000(RepositoryUpdater.java:134) at org.netbeans.modules.java.source.usages.RepositoryUpdater$CompileWorker.parseFiles(RepositoryUpdater.java:1282) at org.netbeans.modules.java.source.usages.RepositoryUpdater$CompileWorker.updateFolder(RepositoryUpdater.java:1473)
Created attachment 42256 [details] 103615
I don't think we have ever supported adding non-menu components to a menu, even though Swing itself allows it. Should we fix this by disabling the ability to drag a component already in the form to the menu? This should probably be looked at by the usability designers.
I have committed a fix. Now you cannot drag a non-menu component into a menu.
verified on Product Version: NetBeans IDE Dev (Build 200706220441) Java: 1.6.0_02-ea; Java HotSpot(TM) Client VM 1.6.0_02-ea-b02 System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)
tested on NetBeans IDE 6.0 RC2 (Build 200711201000)