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.
Build: NetBeans IDE 6.1 (Build 200804211638) VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_04-b12 OS: Windows XP, 5.1, x86 User Comments:
Created attachment 63118 [details] stacktrace
Created attachment 63119 [details] stacktrace
I am sorry, I am not able to reproduce this issue and the attached exception is not sufficient to track the problem down. Are you still able to reproduce it? If so, could you, please, attach the problematic form (both .java and .form) files saved in the last good state and describe exact steps that lead to this exception. Thank you in advance.
StackTrace: =========== java.lang.NullPointerException at org.netbeans.modules.form.layoutdesign.LayoutFeeder.addSimplyAligned(LayoutFeeder.java:732) at org.netbeans.modules.form.layoutdesign.LayoutFeeder.add(LayoutFeeder.java:186) at org.netbeans.modules.form.layoutdesign.LayoutDesigner.addComponents(LayoutDesigner.java:806) at org.netbeans.modules.form.layoutdesign.LayoutDesigner.endMoving(LayoutDesigner.java:750) at org.netbeans.modules.form.HandleLayer$ResizeComponentDrag.end(HandleLayer.java:2504) at org.netbeans.modules.form.HandleLayer$ComponentDrag.end(HandleLayer.java:2145)
No additional information provided => closing as non-reproducible. Feel free to reopen if you are still able to reproduce it, but provide more information then. Thank you in advance.
It is happen in 6.5 and I can't change my form.
Product Version: NetBeans IDE Dev (Build 200808141419) Java: 1.6.0_07; Java HotSpot(TM) Client VM 10.0-b23 System: Linux version 2.6.24-19-generic running on i386; ISO-8859-1; pt_BR (nb) Userdir: /home/hmichel/.netbeans/dev
Created attachment 67986 [details] PRoblematic form...
Created attachment 67987 [details] Problematic Java source
1-Open the attached form 2-Drag the 'Dados' panel right border to the center until the alignment guideline is shown. Then release it.
P1 because 'Product feature does not work, no workaround exists'.
> 2-Drag the 'Dados' panel right border to the center until the alignment guideline is shown. Then release it. What do you want to accomplish? This use-case doesn't make sense to me. The cancelar and fechar buttons are centered below jPanel1. It is not clear what should be done when you attempt to align the right edge of the jPanel1 with the right edge of fechar button. Both these constraints (right and center alignment) cannot be satisfied at once - at least one must be dropped. > P1 because 'Product feature does not work, no workaround exists'. Lowering priority back to P3. One strange resizing attempt in one particular form definitely is not a product feature. Also there is a workaround (that depends on what you want to accomplish). For example, you can drag cancelar and fechar buttons to the lower left corner temporarily, then resize jPanel1 and then return the buttons back to any desired position. But thanks for a reproducible test-case for this exception. I have extracted (from your form) a simple one: 1. Put two JButtons into a row (align them on baseline for example). 2. Put one JToggleButton into a new row below these two buttons. 3. Select all three buttons and invoke Center horizontally. 4. Drag the right edge of JToggleButton slightly to the right. => exception is thrown when the edge is dropped.
>> 2-Drag the 'Dados' panel right border to the center until the alignment guideline is shown. Then release it. >What do you want to accomplish? This use-case doesn't make sense to me. The cancelar and fechar buttons are centered >below jPanel1. It is not clear what should be done when you attempt to align the right edge of the jPanel1 with the >right edge of fechar button. Both these constraints (right and center alignment) cannot be satisfied at once - at least >one must be dropped. The attempt is to move jPanel1 roght border to close with jScrollPane1 right border. In this case, the cancelar and fechar buttons should be centered following the new jPanel1 constraints. And it is a real case when doing maintenance in views, because natual layout is crazy and when I remove/add new components several times the all layout is broken and I need to reorder components. And to prove that it is a real case, I found a workaround, move the JDialog (main component) border to close with the jScrollPane1 border, and this time Matisse knows what should be done. Why it can't do it in the first time? Increasing the priority since the feature is really broken. It should be fixed asap, I hope it can be fixed for 6.5.
I understand that this issue bothers you - that's why you reported it, but please stop increasing its priority without an appropriate justification. This issue doesn't break any general feature, it is about one special case that doesn't work. You even found a workaround and another one was provided by me => setting back to P3.
Your workaround is not viable when you have complex UI. We are talking about real projects, not simple or demo UI. I need to be productive when doing maintenance in legacy UI and this is not helping. I am always try to use the original JDK layouts instead natural layout, since the editor always show several problems. Back to the issue, the workaround I presented is better since is really fast to solve my current problem, what is not true in another scenarios, where your workaround should be used. The question is, why the inner container don't have the same behaviour as when resizing the JDialog? In my scenario the result was really good.
This issue has already 20 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=8636
would be nice to fix it in 6.5.
Hopefully fixed. http://hg.netbeans.org/main/rev/7829fb4b9540 Note to hmichel: Your suggested workaround by resizing whole form was actually a better way to eliminate the gap on the right. Resizing the inner centered panel now works, but after that you'd have to resize the whole form anyway.
Integrated into 'main-golden', will be available in build *200809101401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/7829fb4b9540 User: Tomas Pavek <tpavek@netbeans.org> Log: #77875: resizing vertically may move component out of sequential group #137738: don't try to reposition centered or baselined components
verified on Product Version: NetBeans IDE Dev (Build 20080910214311) Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b13 System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)