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.
Build: NetBeans IDE 8.0 (Build 201403101706) VM: Java HotSpot(TM) 64-Bit Server VM, 25.5-b02, Java(TM) SE Runtime Environment, 1.8.0_05-b13 OS: Windows 8 User Comments: slurp: Run AbcFileType module from api-samples version 8.0. Open any project. Create new abc file. Open the file, and switch to "Visual" multiview. Then do a drag gesture on the bar where multiview tabs are located. To simplify, do it on the right of "History" multiview tab. If the getToolbarRepresentation() of the activated multiview (in this case, "Visual") returns null, this error will not occur. But it will trigger another error when we switch between topcomponent in editor view. Stacktrace: java.lang.IllegalArgumentException: cannot add to layout: constraints must be a GridBagConstraint at java.awt.GridBagLayout.addLayoutComponent(GridBagLayout.java:708) at java.awt.Container.addImpl(Container.java:1125) at javax.swing.JToolBar.addImpl(JToolBar.java:580) at java.awt.Container.add(Container.java:436) at javax.swing.plaf.basic.BasicToolBarUI.setFloating(BasicToolBarUI.java:838) at javax.swing.plaf.basic.BasicToolBarUI.floatAt(BasicToolBarUI.java:1022)
Created attachment 148651 [details] stacktrace
It turns out that the toolbar returned by getToolbarRepresentation() must implement setFloatable(false). Until now I have never seen any usage in Netbeans that requires the toolbar (on MultiViewElement, to be specific) to be floatable. So I propose the snippet below on org.netbeans.modules.apisupport.project.ui.wizard.loader.templateDataObjectMultiVisual.javx @Override public JComponent getToolbarRepresentation() { toolbar.setFloatable(false); return toolbar; }