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 200702182300) 1.6.0-rc; Java HotSpot(TM) Client VM 1.6.0-rc-b104 Windows XP version 5.1 running on x86 en_GB (nb); Cp1252 Description: ============ 1. open jFrame in design 2. insert e.g. jButton 3. do clone document from context menu invoked on tab of your jFrame in design area 4. try to insert another component and align it vertically under your jButton. You will see, form doesn't allow it. And when component is moved somewhere else and then moved back under jButton, an exception occurs StacktTrace: ============ java.lang.IllegalStateException: javax.swing.JButton ....is not attached to a horizontal group at org.jdesktop.layout.GroupLayout.checkComponents(GroupLayout.java:986) at org.jdesktop.layout.GroupLayout.prepare(GroupLayout.java:940) at org.jdesktop.layout.GroupLayout.layoutContainer(GroupLayout.java:806) at org.netbeans.modules.form.layoutdesign.support.SwingLayoutBuilder.createLayout(SwingLayoutBuilder.java:135)
Created attachment 38682 [details] 95954
Apparently free design doesn't work well in cloned views. Other layout managers seem to be fine.
This issue is possibly a duplicate of issue 91892 . As per 91892, the exception happens even when document is not cloned.
Reproducible in NB 200804280002 (DEV), I got following exceptions.
Created attachment 60741 [details] After I followed steps to reproduce (I dropped the second JButton in the Frame)...
Created attachment 60742 [details] After I closed the first exception and attempted to move the second button to another place in the form...
*** Issue 143877 has been marked as a duplicate of this issue. ***
*** Issue 145009 has been marked as a duplicate of this issue. ***
Steps to reproduce ================== 1. Create a new Java Application with a JFrame form 2. Place JButton and JLabel in the form (save the form) 3. Change layout manager of the form to "Grid Bag Layout" (do not save the file) 4. Clone the document view (right-click the editor tab and invoke "Clone Document" from the pop-up menu) -> you have now two tabs with the JFrame designer, the cloned one is focused, leave it focused... 5. Set the layout manager to "Free design" (using the popup menu above the form) 6. Try to move the JLabel somewhere (try to align it bellow the button, for example) -> when you drop the JLabel, IOOBE is thrown Stack trace =========== java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.get(ArrayList.java:322) at org.netbeans.modules.form.layoutdesign.LayoutInterval.getSubInterval(LayoutInterval.java:470) at org.netbeans.modules.form.layoutdesign.LayoutDesigner.intervalRemoved(LayoutDesigner.java:3702) at org.netbeans.modules.form.layoutdesign.LayoutDesigner.layoutChanged(LayoutDesigner.java:2231) at org.netbeans.modules.form.layoutdesign.LayoutDesigner.access$100(LayoutDesigner.java:57) at org.netbeans.modules.form.layoutdesign.LayoutDesigner$Listener.layoutChanged(LayoutDesigner.java:2197) at org.netbeans.modules.form.layoutdesign.LayoutModel.fireEvent(LayoutModel.java:805)
Full stack trace: http://www.netbeans.org/nonav/issues/showattachment.cgi/68244/stacktrace.txt
This issue has already 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=27135
Build: NetBeans IDE 6.1 (Build 200805300101) VM: Java HotSpot(TM) Client VM, 11.0-b12, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b25 OS: Linux, 2.6.22-3-k7, i386 User Comments: Stacktrace: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.get(ArrayList.java:322) at org.netbeans.modules.form.layoutdesign.LayoutInterval.getSubInterval(LayoutInterval.java:467) at org.netbeans.modules.form.layoutdesign.LayoutDesigner.intervalRemoved(LayoutDesigner.java:3702) at org.netbeans.modules.form.layoutdesign.LayoutDesigner.layoutChanged(LayoutDesigner.java:2231) at org.netbeans.modules.form.layoutdesign.LayoutDesigner.access$100(LayoutDesigner.java:57)
Created attachment 73859 [details] stacktrace
*** Bug 190440 has been marked as a duplicate of this bug. ***
There is a big flaw in LayoutDesigner causing that some adjustment changes reacting on component removals are performed more than once - if there is more than one designer for the same model. It's a question whether all the reported exceptions are from the cloned views, or there is yet another bug causing that more than designer is initialized on the same model. (Without cloning the document view this should not be possible.)
Fixed in 7.1 - Free Design improvements
Verified Product Version: NetBeans IDE Dev (Build 201110030601) Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17 System: Linux version 2.6.38-11-generic running on i386; UTF-8; en_US (nb)