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 81947 - LAYOUT: Cannot align right side of a component
Summary: LAYOUT: Cannot align right side of a component
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Natural Layout (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
: 159789 (view as bug list)
Depends on:
Blocks: 136425
  Show dependency tree
 
Reported: 2006-08-04 15:11 UTC by Tim Lebedkov
Modified: 2012-06-15 13:32 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
form (9.69 KB, application/octet-stream)
2006-08-04 15:12 UTC, Tim Lebedkov
Details
java-form (10.24 KB, text/plain)
2006-08-04 15:12 UTC, Tim Lebedkov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Lebedkov 2006-08-04 15:11:10 UTC
in the attached file take the right side of jTextFieldTitle and resize the
component in such a way that its right side is aligned with the right side of
the whole panel, then release the mouse. => the component will not be resized

NB 5.0 (form update 1)
Comment 1 Tim Lebedkov 2006-08-04 15:12:27 UTC
Created attachment 32546 [details]
form
Comment 2 Tim Lebedkov 2006-08-04 15:12:48 UTC
Created attachment 32547 [details]
java-form
Comment 3 Jan Stola 2006-08-08 09:40:02 UTC
I was able to reproduce the issue. The following exception is thrown:

java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
 at java.util.ArrayList.RangeCheck(Unknown Source)
 at java.util.ArrayList.get(Unknown Source)
 at org.netbeans.modules.form.layoutdesign.LayoutInterval.getSubInterval
    (LayoutInterval.java:423)
 at org.netbeans.modules.form.layoutdesign.LayoutFeeder.mergeSequentialInclusion
    (LayoutFeeder.java:2662)
 at org.netbeans.modules.form.layoutdesign.LayoutFeeder.add
    (LayoutFeeder.java:274)
 at org.netbeans.modules.form.layoutdesign.LayoutDesigner.endMoving
    (LayoutDesigner.java:631)
 at org.netbeans.modules.form.HandleLayer$ResizeComponentDrag.end
    (HandleLayer.java:2362)
 at org.netbeans.modules.form.HandleLayer$ComponentDrag.end
    (HandleLayer.java:2031)
 at org.netbeans.modules.form.HandleLayer.endDragging(HandleLayer.java:864)
 at org.netbeans.modules.form.HandleLayer.mouseReleased(HandleLayer.java:1413)

Lowering to P3: the form is not corrupted - it is reverted back to the original 
layout after the exception. There is also a simple workaround: Resize the text 
field to the right, but use the suggested gap. Resize the text field to align 
with the right size of the container in the second step.
Comment 4 Jan Stola 2009-03-24 17:22:41 UTC
*** Issue 159789 has been marked as a duplicate of this issue. ***
Comment 5 asenk 2011-10-04 07:54:48 UTC
Still valid in:

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 MackSix 2012-03-21 18:40:23 UTC
Still valid in: 

Product Version: NetBeans IDE 7.0.1 (Build 201107282000)
Java: 1.7.0_03; Java HotSpot(TM) Client VM 22.1-b02
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)

Works for me in:

Product Version: NetBeans IDE 7.1.1 (Build 201202271535)
Java: 1.7.0_03; Java HotSpot(TM) Client VM 22.1-b02
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)

Works for me in:

Product Version: NetBeans IDE Dev (Build 201203210400)
Java: 1.7.0_03; Java HotSpot(TM) Client VM 22.1-b02
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)