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 80639 - Dragging/dropping toolbar in XML editor window leads to exception
Summary: Dragging/dropping toolbar in XML editor window leads to exception
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Nathan Fiedler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-19 16:25 UTC by Andrei Chistiakov
Modified: 2006-07-21 12:46 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Chistiakov 2006-07-19 16:25:47 UTC
Reproduced in build 060718_1.

To reproduce the bug:

- open a schema;
- push left mouse button in toolbar area of the opened schema window;
- drag over client area of the window and release mouse. The toolbar becomes
undocked;
- push left mouse button in the undocked toolbar window anywhere except caption
and buttons;
- drag it back to the schema window toolbar area and drop.

java.lang.IllegalArgumentException: cannot add to layout: constraints must be a
GridBagConstraint
	at java.awt.GridBagLayout.addLayoutComponent(GridBagLayout.java:685)
	at java.awt.Container.addImpl(Container.java:1058)
	at javax.swing.JToolBar.addImpl(JToolBar.java:556)
	at java.awt.Container.add(Container.java:366)
	at javax.swing.plaf.basic.BasicToolBarUI.setFloating(BasicToolBarUI.java:823)
	at javax.swing.plaf.basic.BasicToolBarUI.floatAt(BasicToolBarUI.java:1006)
	at
javax.swing.plaf.basic.BasicToolBarUI$Handler.mouseReleased(BasicToolBarUI.java:1163)
	at java.awt.Component.processMouseEvent(Component.java:5999)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3240)
	at java.awt.Component.processEvent(Component.java:5764)
	at java.awt.Container.processEvent(Container.java:1984)
	at java.awt.Component.dispatchEventImpl(Component.java:4407)
	at java.awt.Container.dispatchEventImpl(Container.java:2042)
	at java.awt.Component.dispatchEvent(Component.java:4237)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4248)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3912)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3842)
	at java.awt.Container.dispatchEventImpl(Container.java:2028)
	at java.awt.Window.dispatchEventImpl(Window.java:2405)
	at java.awt.Component.dispatchEvent(Component.java:4237)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:600)
	at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Comment 1 Chris Webster 2006-07-19 23:04:54 UTC
This is a corner case, but I am not sure this is related to our code. This may
be a JDK issue. 
Comment 2 Nathan Fiedler 2006-07-21 02:22:51 UTC
The fix is to make the toolbar not floatable, as is standard with all of
NetBeans toolbars. I have fixed this on release55 branch in revision 1.1.2.21 of
SchemaColumnViewMultiViewElement.java in schema/core module. Will do the same
for the WSDL editor.
Comment 3 Andrei Chistiakov 2006-07-21 12:46:14 UTC
Verified in build 060720.