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 129494 - LAYOUT: Moving right edge of JTextField towards right edge resizes JPanel
Summary: LAYOUT: Moving right edge of JTextField towards right edge resizes JPanel
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Natural Layout (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks: 136425
  Show dependency tree
 
Reported: 2008-03-07 01:33 UTC by dustin_mccartney
Modified: 2011-10-05 14:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Java file for Form which resizes incorrectly. (10.51 KB, text/plain)
2008-03-07 01:34 UTC, dustin_mccartney
Details
Form that incorrectly resizes based on Component changes. (11.99 KB, text/plain)
2008-03-07 01:34 UTC, dustin_mccartney
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dustin_mccartney 2008-03-07 01:33:14 UTC
Sometimes when moving the right edge of components (JTextField being one) toward the right edge of the parent component,
the parent component (JPanel) resizes for an unexplained reason.  Attached is a sample Form that exhibits this problem.

 1) Open the attached Form in Design mode.
 2) Select the JTextField which contains the text "Move right edge to the right --->".
 3) Move the right edge handle of this component right towards the button labeled "Version".
 4) Watch the parent component's width increase [WRONG]

Expected Behavior

The parent component's width should not resize.

This _might_ be related to Issue #129225 (http://www.netbeans.org/issues/show_bug.cgi?id=129225)
Comment 1 dustin_mccartney 2008-03-07 01:34:16 UTC
Created attachment 57933 [details]
Java file for Form which resizes incorrectly.
Comment 2 dustin_mccartney 2008-03-07 01:34:49 UTC
Created attachment 57934 [details]
Form that incorrectly resizes based on Component changes.
Comment 3 dustin_mccartney 2008-03-07 01:43:18 UTC
More odd behavior can be seen by loading the attached Java/Form and:

 1) Switch to "Design" mode.
 2) Delete the button labeled "Version" to the right of the JTextField containing the text "Move right edge to the right
--->".
 3) Select the JTextField containing the text "Move right edge to the right --->" and move it's right edge handle so
that it aligns with the RIGHT edge of the "Version" buttons below it.
 4) When you let go of the mouse button, the JTextField snaps back to its original width.  [WRONG]

Expected Behavior

The JTextField should be re-sized to have its right edge matched with the right edges of the "Version" buttons.
Comment 4 Jan Stola 2008-03-07 09:00:31 UTC
Reproducible.
Comment 5 asenk 2011-10-04 11:53:20 UTC
The second case is fixed.
The first one is still valid

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)
Comment 6 Quality Engineering 2011-10-05 14:12:12 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/117d1833eb2f
User: Tomas Pavek <tpavek@netbeans.org>
Log: #129494: several fixes in gap reduction
Comment 7 Tomas Pavek 2011-10-05 14:21:59 UTC
Both cases should be fixed now.