GroupLayout constraints object must be of type GroupLayout.Constraints

I'm looking for a GUI to use with a game and comparing the different ones available to JME, I've decided to try GBUI.

However, when trying to run some of the tests, I get this error:

java.lang.RuntimeException: GroupLayout constraints object must be of type GroupLayout.Constraints
   at com.jmex.bui.layout.GroupLayout.addLayoutComponent(
   at com.jmex.bui.BContainer.add(
   at com.jmex.bui.BContainer.add(
   at com.jmex.bui.headlessWindows.BTitledWindow.init(
   at com.jmex.bui.headlessWindows.BTitledWindow.<init>(
   at com.jmex.bui.headlessWindows.MessageWindowUtil.createMessageBox(
   at com.jmex.bui.CollapsingTiledMessageWindowTest.createWindows(
   at com.jmex.bui.base.BaseTest2.simpleInitGame(
   at com.jmex.bui.CollapsingTiledMessageWindowTest.main(

This was for CollapsingTiledMessageWindowTest, but I also got it in InfoBoxTest, InfoDialogBoxTest and several others (e.g. AllDialogsTest).
I couldn't find any information on this error through google or here on the forums. What could be the problem?

Thank you beforehand.

Interesting.  That sounds like the tests weren't fixed for the Enumeration changes.

I'll double check those.

Are you using JME 2 with GBUI 2 or the 1.1 builds?

I'm using JME 2 (from and GBUI from here:

ok, I made a ton of changes yesterday to fix this.  There is some code checked in that relies on the Justification and Constraints not being in GroupLayout, but that code isn't there.

I'll get this fixed today.  The jar release should be fine…if you have problems with that let me know.

I'll post when I get the code and new jars checked in.

Thank you!

Did you get it commited to svn yet?

I tried to update but I'm still getting the error and I'm not sure if I'm updating the wrong way or if it's not there yet.

I committed the changes.  Sometimes this error shows up if you're trying to use a BWindow by adding components to a BorderLayout.  I'm looking at some of the changes to see why they're there in BWindow.

If you're using a BorderLayout and having this problem then in your constructor of a subclass of BWindow set the layout manager setLayoutManager(new BorderLayout()); or window.setLayoutManager(new BorderLayout()); if you're not using a subclass but BWindow itself.

It looks like the layout manager is being overridden in the BWindow Constructors, I'll try to fix that ASAP and check it in today.

Thanks for working on this!

I'm still getting the error for the tests.

I'm not using a BWindow or a BorderLayout, I'm just trying to run the tests (specifically AllDialogsTest and InputBoxTest), so I can read the source and understand how the gui works, but I'm getting this error when I try to run them.

I've tried updating and also deleting everything and reinstalling from svn. Still the same.

I'll try the jars too, but it would be nice to have a working source to learn from.

It's great that there is a wiki and I'm grateful for the tutorials there, but I can't seem to find any code for how to make input boxes and other things.

you actually are unknowingly using a BorderLayout… I'm looking at this now.  It's the same issue just started from a different class.

Fixed!  I found some code that was checked in on the 24th of March (by me no less) for the MenuBar changes.  They were not complete, and were not checked in on a branch.

Your issues should be resolved now by syncing BWindow from the trunk tip

Yes, they are now working very well! :slight_smile:

A thousand thanks!

That was probably the fastest response I've ever gotten from a dev about these kind of matters.

With the new update there is an error in MenuTest at this line:

BMenuBar bar = window.getMenuBar();

It says there is no getMenuBar-method for BWindow (BDecoratedWindow).

It's not crucial to what I'm doing now, just thought you might like to know.

yeah I need to remove the MenuTest for now.  Just delete that class file for now.  The issue was some of the work for the MenuBar which is used by the MenuTest class.

I'll have to go back through the diff submitted for the MenuBar to see if I can figure out what went wrong.

YW, I try to answer as soon as I possibly can.  I normally check the forums like 10 times a day, but I've been sick recently so today is the first day i've felt ok enough to check the forums more in 4 weeks.