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 203742 - 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=
Summary: IllegalStateException: javax.swing.JButton[,186,324,79x25,invalid,alignmentX=...
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-14 16:06 UTC by MackSix
Modified: 2011-11-08 15:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 182008


Attachments
stacktrace (3.67 KB, text/plain)
2011-10-14 16:07 UTC, MackSix
Details
Project that exhibits the error. (26.82 KB, application/zip)
2011-10-14 17:02 UTC, MackSix
Details
Screenshot of action. (210.90 KB, image/png)
2011-10-14 17:03 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2011-10-14 16:06:56 UTC
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)
Comment 1 MackSix 2011-10-14 16:07:03 UTC
Created attachment 112068 [details]
stacktrace
Comment 2 MackSix 2011-10-14 17:02:03 UTC
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)
Comment 3 MackSix 2011-10-14 17:03:19 UTC
Created attachment 112072 [details]
Screenshot of action.

Position to add new JLabel from palette.
Comment 4 Jan Stola 2011-10-17 15:58:15 UTC
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?
Comment 5 MackSix 2011-10-17 16:28:01 UTC
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
Comment 6 Jan Stola 2011-10-19 15:35:22 UTC
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).
Comment 7 Tomas Pavek 2011-11-07 21:26:55 UTC
Fixed.
http://hg.netbeans.org/jet-main/rev/1553d968d94b
Comment 8 Quality Engineering 2011-11-08 15:40:21 UTC
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