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 99699 - MD - Attempt to move JMenu from JMenuBar causes AE
Summary: MD - Attempt to move JMenu from JMenuBar causes AE
Status: REOPENED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: App Framework (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Joshua Marinacci
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-02 15:48 UTC by Jana Maleckova
Modified: 2008-05-05 09:50 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
99699 (4.52 KB, text/plain)
2007-04-02 16:04 UTC, Jana Maleckova
Details
the first stack trace is wrong, pls use this one (1.79 KB, text/plain)
2007-04-02 16:25 UTC, Jana Maleckova
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jana Maleckova 2007-04-02 15:48:24 UTC
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)
Comment 1 Jana Maleckova 2007-04-02 16:04:31 UTC
Created attachment 40265 [details]
99699
Comment 2 Jana Maleckova 2007-04-02 16:25:13 UTC
Created attachment 40268 [details]
the first stack trace is wrong, pls use this one
Comment 3 Joshua Marinacci 2007-04-18 03:37:22 UTC
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.
Comment 4 Jana Maleckova 2007-05-18 12:48:50 UTC
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.
Comment 5 Joshua Marinacci 2007-05-30 21:47:29 UTC
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.