Spacers

Hi,
I can't figure out how to use the spacer widgets (the little springy thingies).

I'm trying to space a table in a panel such that there is a space around the panel. This is what I did:
-I select the panel.
-I select break layout (it was a grid layout)
-I select a horizontal spacer and add it to the left of the panel.
At this point the spacer seems to have no idea that it is "in" the selected panel.

- I re-select grid layout (other wise the system gives me a weird error message: "There are not empty panels with XY layouts" ---whatever that means).

The resulting layout pushes the table all the way to the right.

At this point I go back to the form layout attmept to delete the spacers and, unfortunately I have broken everything.


I guess my question is: How are the spacers supposed to work? Do they require binding? Can the width or height of the spacer be set? Are they really spring-like in that they will push something as far as it can go. If I put two springs on one side and one on the other will the two springs push further than the one?

7 comments
Comment actions Permalink

Hello,

Spacers is a special empty dummy component that can fill empty layout cell. Just for disable growing of other components.

0
Comment actions Permalink

Got it! Thanks.
What happens if you put one on either side of a component?

Trev...

0
Comment actions Permalink

The story continues:

I put the spacers in and ran the project. I got an error message in the console saying no class def for com/intelliJ/UIDesigner.core.Spacer

Just in case I added com/intelliJ/UIDesigner.core to the library. Same error.

2) I deleted the spacers and ran the program and got: error message java.lang.NoClassDefFoundError: com/intellij/uiDesigner/core/GridLayoutManager

If I switch to the ".Java" file view from the form view I get a null pointer exception and have to quit IDEA.

Any suggesstions??

Thanks

Trev...

0
Comment actions Permalink

You need forms_rt.jar in your libraries to compile and run application.

0
Comment actions Permalink

Forgot the location :)
This one in %IDEA_HOME%/lib

0
Comment actions Permalink

Thanks....that's weird though because it was working fine yesterday...but adding it to the library worked.
Trev...

0

Please sign in to leave a comment.