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 200609171800) 1.6.0-rc; Java HotSpot(TM) Client VM 1.6.0-rc-b98 Windows XP version 5.1 running on x86 cs_CZ (nb); Cp1250 Description: ============ In attachment there is form file. Add this form to your project and in design mode, take right margin in mouse and try to resize it in direction to the left. Then an exception will occure. I found method how to create this issue but I am not sure if it will appear in every case. That why I enclosed form file. 1) create JFrame and insert two JPanels into it 2)these two panels should cut frame in two parts (north and sourth part) First one should be extended to span between the container's left and right margins in accordance with the recommended offset. The second one is added in the same way but under the first one (you can see form in attachment). 3) Select both JPanels and check attribute Horizonatal Resizable. Buttons "Change horizontaly and verticaly resizability" should not be pushed 4) add JLabel and JTextField into the first Panel. Swings should be in the same horizontal group with preffered gap between them. JLabel will be placed in the left corner. The JTextField's right edge snaps into alignment with the JPanel's recommended edge margin. 5) then insert JButton into the right corner of first JPanel. Then JFrame becomes wider. 6) Use undo button. 7) Then put the right margin of JFrame in mouse and try to resize it in left direction. Make it smaller. Then exception will occure. So first issue is thrown exception The second one is that undo didn't work correctly. JButton disappeared but the size of the frame didn't return back. StackTrace: =========== java.lang.AssertionError at org.netbeans.modules.form.layoutdesign.support.SwingLayoutBuilder.convertSize(SwingLayoutBuilder.java:297) at org.netbeans.modules.form.layoutdesign.support.SwingLayoutBuilder.fillGroup(SwingLayoutBuilder.java:201) at org.netbeans.modules.form.layoutdesign.support.SwingLayoutBuilder.composeGroup(SwingLayoutBuilder.java:172)
Created attachment 34177 [details] form
Created attachment 34178 [details] java
Created attachment 34179 [details] StackTrace
The exception is not thrown anymore. The undo of designer size does not work due to rather special conditions: the two panels are placed in a group with suppressed resizing, which does not allow shrinking. After undo the model is correct, but jPanel2 that grew after adding the button next to jPanel1 is not rebuilt after undo because there is no event for updating just the empty space size. There is attempt to return back the designer size, but the not-updated jPanel2 prevents that.
The undo problem is analogical to bug 94605. *** This bug has been marked as a duplicate of bug 94605 ***