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.
Product Version: NetBeans IDE Dev (Build 200803021202) Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb) Description =========== 1. New Java Application -> add new JFrame 2. Place JTabbedPane to JFrame as displayed in scr.jpg 3. Place JTextArea to JFrame as displayed in scr.jpg 4. Place JButton to JFrame as displayed in scr.jpg 5. In Designer Window select both components JTextArea and JButton 6. Invoke popup menu and select Align -> Top Bottom NullPointer Exception is raised.
Created attachment 57651 [details] scr1.jpg
Stack Trace ----------- java.lang.NullPointerException at org.netbeans.modules.form.layoutdesign.LayoutInterval.getEffectiveAlignment(LayoutInterval.java:966) at org.netbeans.modules.form.layoutdesign.LayoutAligner.splitByAlignAttrs(LayoutAligner.java:350) at org.netbeans.modules.form.layoutdesign.LayoutAligner.splitByAlignAttrs(LayoutAligner.java:208) at org.netbeans.modules.form.layoutdesign.LayoutAligner.splitByAlignAttrs(LayoutAligner.java:208) at org.netbeans.modules.form.layoutdesign.LayoutAligner.alignIntervals(LayoutAligner.java:90) at org.netbeans.modules.form.layoutdesign.LayoutDesigner.align(LayoutDesigner.java:2835) at org.netbeans.modules.form.FormDesigner.align(FormDesigner.java:1272) at org.netbeans.modules.form.FormDesigner$AlignAction.actionPerformed(FormDesigner.java:2433) at org.netbeans.modules.form.actions.AlignAction$AlignMenuItemListener.actionPerformed(AlignAction.java:237)
Reproducible. On the other hand, this use-case doesn't have much sense => lowering priority.
*** Issue 138959 has been marked as a duplicate of this issue. ***
Created attachment 100550 [details] stacktrace
*** Bug 201381 has been marked as a duplicate of this bug. ***
I can't reproduce this using the test case described by the original reporter. I do have another test case that caused this exception, but the project that I saved changes configuration when opened in NetBeans. One of the components jumps out of positions when opened. See http://statistics.netbeans.org/analytics/exception.do?id=531727 I will upload the configuration since it might be useful to look at. Product Version: NetBeans IDE Dev (Build 201110050601) 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)
Created attachment 111662 [details] Project that exhibited the error before saved. jPanel5 was lower in the mirrored position from jPanel4 aligned with jPanel2 and jPanel3 out edges. If you open this project and then open NewJFrame.java, you may be able to see jPanel5 jump from where it was when I saved the file to the current position. Before saving and when jPanel5 was in the right location, this error was thrown whenever I tried to use "Align top in row" button.
That is, when I only highlighted jPanel1, jPanel2 & jPanel3 and tried to use "Align top in row" button.
Created attachment 112030 [details] New Project that exhibits the error. 1) Open attached project. 2) Open NewJFrame.java 3) Highlight panel2, choice1, button4, textField4, textArea2, scrollbar3. 4) Click "Align top in row" on Designer toolbar. This NullPointerException occurs. Product Version: NetBeans IDE Dev (Build 201110120600) 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)
This bug already has 20 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=72033
Created attachment 112249 [details] stacktrace 1. In NewJframe.java in Designer select jButton2 an jLabel1 2. Click on Align top in row
Created attachment 112250 [details] asenk project
(In reply to comment #13) > Created an attachment (id=112250) [details] > asenk project There is no components on the JFrame.
Created attachment 112271 [details] asenk
(In reply to comment #14) > (In reply to comment #13) > > Created an attachment (id=112250) [details] [details] > > asenk project > > There is no components on the JFrame. Thanks, it was my mistake. I uploaded new project.
Created attachment 120085 [details] stacktrace Top align jRadioButton and 2 jCheckbox.