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 253307 - IllegalArgumentException: illegal anchor value
Summary: IllegalArgumentException: illegal anchor value
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-04 18:37 UTC by pbradley
Modified: 2019-03-05 12:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 218339


Attachments
stacktrace (4.97 KB, text/plain)
2015-07-04 18:37 UTC, pbradley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pbradley 2015-07-04 18:37:48 UTC
Build: NetBeans IDE 8.0.2 (Build 201411181905)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.40-b25, Java(TM) SE Runtime Environment, 1.8.0_40-b26
OS: Windows 7

User Comments:
pbradley: I created a jpanel (not using the matisse builder) and tried to drop it onto a jfame using matisse




Stacktrace: 
java.lang.IllegalArgumentException: illegal anchor value
   at java.awt.GridBagLayout.AdjustForGravity(GridBagLayout.java:1769)
   at java.awt.GridBagLayout.AdjustForGravity(GridBagLayout.java:1610)
   at java.awt.GridBagLayout.ArrangeGrid(GridBagLayout.java:2200)
   at java.awt.GridBagLayout.ArrangeGrid(GridBagLayout.java:2031)
   at java.awt.GridBagLayout.layoutContainer(GridBagLayout.java:812)
   at java.awt.Container.layout(Container.java:1508)
Comment 1 pbradley 2015-07-04 18:37:50 UTC
Created attachment 154486 [details]
stacktrace
Comment 2 Kallscx 2019-03-05 12:23:51 UTC
For anyone who got this bug:
According to src code from https://searchcode.com/codesearch/view/17991410/
This bug will be raised if the gridbag constraint is not one of the following:

BASELINE BASELINE_LEADING BASELINE_TRAILING ABOVE_BASELINE ABOVE_BASELINE_LEADING
ABOVE_BASELINE_TRAILING BELOW_BASELINE BELOW_BASELINE_LEADING BELOW_BASELINE_TRAILING CENTER PAGE_START NORTH NORTHEAST EAST SOUTHEAST PAGE_END SOUTH SOUTHWEST WEST NORTHWEST LINE_START LINE_END FIRST_LINE_START FIRST_LINE_END LAST_LINE_START LAST_LINE_END

I got the same problem when I constructed a gridbag constraint which its anchor initialised to HORIZONTAL, and it fixed when i changed to center which is one of the above value.

hope this help anyone who got the same problem