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.

Bug 61722 - Component is moved itself
Summary: Component is moved itself
Status: VERIFIED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Natural Layout (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Scott Violet
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-03 10:34 UTC by Marek Grummich
Modified: 2005-10-25 14:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
FFrame.form (5.88 KB, text/plain)
2005-08-03 10:35 UTC, Marek Grummich
Details
FFrame.java (5.72 KB, text/plain)
2005-08-03 10:35 UTC, Marek Grummich
Details
Form file showing the incorrect calculation of padding size. (4.35 KB, text/plain)
2005-08-04 11:19 UTC, Jan Stola
Details
Java file showing the incorrect calculation of padding size. (4.69 KB, text/plain)
2005-08-04 11:19 UTC, Jan Stola
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Grummich 2005-08-03 10:34:55 UTC
Build 200508021800, jdk1.5.0_04
Steps:
- open an attached form
- select jTextField2
- use D&D functionality to place jTextField2 so that components have following
order: JPanel's edge, suggested gap, 'Prijmeni', suggested gap, jTextField2
=> jTextField2 is moved itself close to 'Prijmeni'; suggested gap is missing!!!
Comment 1 Marek Grummich 2005-08-03 10:35:29 UTC
Created attachment 23441 [details]
FFrame.form
Comment 2 Marek Grummich 2005-08-03 10:35:44 UTC
Created attachment 23442 [details]
FFrame.java
Comment 3 Jan Stola 2005-08-04 11:16:42 UTC
The layout model is created correctly. The problem is in the GroupLayout
itself. It incorrectly calculates size of the preferred padding.
I will attach the resulting form (EmptyF).

Note that there is a preffered gap before jTextField2. The calculated size
of this gap is 0. It should be the preferred padding between jTextField2
and jLabel1, jLabel2 pair.

The problem seems to be in SequentialGroup.insertAutopadding() method.
It looks for next autopadding (using getNextAutopadding() method)
when it finds some sources for a padding. Unfortunately the method
getNextAutopadding() is not able to find the correct padding in this case.
Comment 4 Jan Stola 2005-08-04 11:19:11 UTC
Created attachment 23487 [details]
Form file showing the incorrect calculation of padding size.
Comment 5 Jan Stola 2005-08-04 11:19:50 UTC
Created attachment 23488 [details]
Java file showing the incorrect calculation of padding size.
Comment 6 Jan Stola 2005-08-10 15:52:38 UTC
Fixed.
Comment 7 Marek Grummich 2005-10-25 14:29:52 UTC
Seems to be fixed in the build 200510241800