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.
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)
This is a corner case, but I am not sure this is related to our code. This may be a JDK issue.
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.
Verified in build 060720.