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.
NaturalLayout build 20050504 Drag jButton1 close to jTextField1 (to display guiding lines) and when it snaps to guide lines, release mouse button => assertion error is thrown and button is not visible any more. Undo does not work here.
Created attachment 22029 [details] Form file
Created attachment 22030 [details] Java file
Created attachment 22031 [details] Assertion error
The attached form is already in a wrong state. Looking at the generated code, there is a snippet: .add(54, 54, 54) .add(6, 6, 6) This means two consecutive gaps before the button which is wrong (there should be one 60, 60, 60 instead). Would you be able to reproduce the form creation to the point when this appears in the code? (It is likely a step or two before the state you've attached).
*** Issue 58696 has been marked as a duplicate of this issue. ***
I can reproduce it with these steps: 0, Open newly attached form 1, Select jTextField1 and downsize it to align its right edge with right edge of jPanel1 2, Add JButton => it is added with big gap
Created attachment 22051 [details] Form file one step before problem occures
Created attachment 22052 [details] Java file one step before problem occures
*** Issue 58699 has been marked as a duplicate of this issue. ***
*** Issue 58698 has been marked as a duplicate of this issue. ***
I've committed a fix for this. It is not as general as I would like, but if another case appears it should throw AE immediatelly so it will be easier to notice. Available in build 20050510.
Verified