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 211888 - JFrame in Designer View Changes Size When Moved to Another Package
Summary: JFrame in Designer View Changes Size When Moved to Another Package
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Natural Layout (show other bugs)
Version: 7.2
Hardware: PC Windows Vista
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-30 23:01 UTC by MackSix
Modified: 2012-05-12 09:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Project to use for reproduction. (199.05 KB, application/zip)
2012-04-30 23:01 UTC, MackSix
Details
Before Screenshot (5.72 KB, image/png)
2012-04-30 23:01 UTC, MackSix
Details
After Screenshot (8.21 KB, image/png)
2012-04-30 23:01 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2012-04-30 23:01:02 UTC
Created attachment 118908 [details]
Project to use for reproduction.

JFrame in Designer view changes size when moved to another package.

1) Open Attached Project.
2) Open NewJFrame.java in Designer.
3) Move NewJFrame.java to "newpackage" with refactoring.
4) JFrame in Designer view gets shorter and lower edge covers lower label a bit. (See attached before and after screenshots.)

Product Version: NetBeans IDE Dev (Build 201204270400)
Java: 1.7.0_04; Java HotSpot(TM) Client VM 23.0-b21
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
Comment 1 MackSix 2012-04-30 23:01:35 UTC
Created attachment 118909 [details]
Before Screenshot
Comment 2 MackSix 2012-04-30 23:01:58 UTC
Created attachment 118910 [details]
After Screenshot
Comment 3 Tomas Pavek 2012-05-11 14:10:55 UTC
It's not related to moving, it's enough to reopen the form.

The problem seems to be in that the text of one property is set via binding, which happens later after the label is added to the container. GroupLayout for some reason keeps considering the original zero size of the label as seen first time and so returns smaller overall size when later asked for preferred size of the container. So it's only an incorrect initial size of the designer.

Fixed: http://hg.netbeans.org/jet-main/rev/84e17d963fde
Comment 4 Quality Engineering 2012-05-12 09:59:45 UTC
Integrated into 'main-golden', will be available in build *201205120400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/84e17d963fde
User: Tomas Pavek <tpavek@netbeans.org>
Log: #211888: property set to cloned object from binding is set later and if it affects component size, GroupLayout may not consider the change