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 203480 - AssertionError at org.netbeans.modules.form.layoutdesign.LayoutDesigner.updateContainerGapResizing
Summary: AssertionError at org.netbeans.modules.form.layoutdesign.LayoutDesigner.updat...
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Natural Layout (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-11 06:36 UTC by MackSix
Modified: 2011-11-03 15:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 181869


Attachments
stacktrace (2.97 KB, text/plain)
2011-10-11 06:36 UTC, MackSix
Details
Project that exhibits the error. (24.05 KB, application/zip)
2011-10-11 06:38 UTC, MackSix
Details
Screenshot shows where to position top of jPanel1 (22.21 KB, image/png)
2011-10-11 06:39 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2011-10-11 06:36:17 UTC
Build: NetBeans IDE Dev (Build 201110100600)
VM: Java HotSpot(TM) Client VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147
OS: Windows Vista

User Comments:
MackSix: Tried to horizontally size a jPanel with components on it down below a jEditorPane.




Stacktrace: 
java.lang.AssertionError
   at org.netbeans.modules.form.layoutdesign.LayoutDesigner.updateContainerGapResizing(LayoutDesigner.java:3941)
   at org.netbeans.modules.form.layoutdesign.LayoutDesigner.updateContainerAfterChange(LayoutDesigner.java:3925)
   at org.netbeans.modules.form.layoutdesign.LayoutDesigner.addComponents(LayoutDesigner.java:1259)
   at org.netbeans.modules.form.layoutdesign.LayoutDesigner.endMoving(LayoutDesigner.java:1153)
   at org.netbeans.modules.form.HandleLayer$ResizeComponentDrag.end(HandleLayer.java:2887)
   at org.netbeans.modules.form.HandleLayer$ComponentDrag.end(HandleLayer.java:2487)
Comment 1 MackSix 2011-10-11 06:36:21 UTC
Created attachment 111825 [details]
stacktrace
Comment 2 MackSix 2011-10-11 06:38:36 UTC
Created attachment 111826 [details]
Project that exhibits the error.

1) Open attached project.
2) Open NewJFrame.java.
3) Grab top of jPanel1 and try to pull vertically down to the large preferred distance from jEditorPane/jScrollPane above. (See attached screenshot)

This error occurs.

Product Version: NetBeans IDE Dev (Build 201110100600)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
Comment 3 MackSix 2011-10-11 06:39:51 UTC
Created attachment 111827 [details]
Screenshot shows where to position top of jPanel1

Screenshot shows where to position top of jPanel1.
Comment 4 Jan Stola 2011-10-11 13:46:01 UTC
I am sorry, I am not able to reproduce this issue. I used the mentioned build 201110100600, JDK 7 on Windows and followed the mentioned steps but I didn't obtain any exception. Are you still able to reproduce it? Any chance that it was caused by some previous exception (that left NetBeans in some inconsistent state)?
Comment 5 MackSix 2011-10-17 08:07:11 UTC
I just downloaded this file and opened it in

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

and it still causes the error with the steps described.

On step 3), you are vertically resizing the jPanel1 and making it shorter when trying to snap in place. Maybe you tried to reposition the whole panel down and it did not cause the error.

Please try again. Thanks
Comment 6 Jan Stola 2011-10-19 15:17:37 UTC
> Maybe you tried to reposition the whole panel down
> and it did not cause the error.

No, I tried the correct steps and they didn't lead to the exception on my computer, but when you confirmed that you are still able to reproduce this issue then I investigated this issue a bit more. Your screenshot shows that you are using larger fonts that I am using. So, I changed the default windows font to a larger one (using Control Panel > Display, from Smaller to Medium) and I was able to reproduce the exception using the described steps after that.
Comment 7 MackSix 2011-10-19 15:48:25 UTC
In Windows Vista, this is using the Control Panel>>Appearance and Personalization>>Personalization then on the left there is an option that says "Adjust font size (DPI)"


If one chooses the "Custom DPI" scaling button and then un-checks "Use Windows XP style DPI Scaling" it is different type scaling that would have not caused this problem.
Comment 8 Tomas Pavek 2011-11-02 13:43:07 UTC
Fixed.
http://hg.netbeans.org/jet-main/rev/c5b4aa121d15
Comment 9 Quality Engineering 2011-11-03 15:31:45 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/c5b4aa121d15
User: Tomas Pavek <tpavek@netbeans.org>
Log: #203480: on container resizing should try to remove only the ending gaps