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.
This issue was reported manually by MackSix. It already has 1 duplicates Build: NetBeans IDE Dev (Build 201110120600) VM: Java HotSpot(TM) Client VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147 OS: Windows Vista User Comments: MackSix: Adding a jLabel to a AWT panel. Stacktrace: java.lang.IllegalStateException: javax.swing.JButton[,186,324,79x25,invalid,alignmentX=0.0,alignmentY=0.5,border=com.sun.java.swing.plaf.windows.XPStyle$XPEmptyBorder@1e4d1f1,flags=296,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=14,bottom=2,right=14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=jButton1,defaultCapable=true] is not attached to a horizontal group at javax.swing.GroupLayout.checkComponents(GroupLayout.java:1086) at javax.swing.GroupLayout.prepare(GroupLayout.java:1040) at javax.swing.GroupLayout.layoutContainer(GroupLayout.java:910) at org.netbeans.modules.form.layoutdesign.support.SwingLayoutBuilder.createLayout(SwingLayoutBuilder.java:192) at org.netbeans.modules.form.layoutdesign.support.SwingLayoutBuilder.setupContainerLayout(SwingLayoutBuilder.java:102) at org.netbeans.modules.form.VisualReplicator.setupContainerLayout(VisualReplicator.java:814)
Created attachment 112068 [details] stacktrace
Created attachment 112071 [details] Project that exhibits the error. 1) Open Project in NetBeans. 2) Open NewJFrame.java. 3) Add a new JLabel to the frame by positioning it at the small preferred distance under jLabel1 and snap the left side of the new JLabel to the indentation line of jLabel1. See attached screenshot for position. This Exception is thrown. 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)
Created attachment 112072 [details] Screenshot of action. Position to add new JLabel from palette.
I am sorry, I am not able to reproduce this issue. I tried the attached project and the described steps in the latest development build and in build 201110120600 but no exception is thrown. This kind of exception is usually a consequence of some previous problem. Are you still able to reproduce it?
Yes, I just tried it with 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 I get this exception. I probably did have an error with this file before it was in the state it is now. If you try to "Align left in column" of any group of 3 from the other components on the form, it throws AssertionError at org.netbeans.modules.form.layoutdesign.LayoutInterval.getCurrentSpace
This is the same case as issue 203480. I am able to reproduce it when I modify Windows font settings - to use larger font (using Control Panel > Display, from Smaller to Medium).
Fixed. http://hg.netbeans.org/jet-main/rev/1553d968d94b
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/1553d968d94b User: Tomas Pavek <tpavek@netbeans.org> Log: #203742: preventing possibilty to lose part of layout tree, plus some additional tweaks