alcaprar
alcaprar

Reputation: 787

Intellij error with "add non-palette componente"

When I try to add a non-palette component in IntelliJ 14.0.3 I get this error:

Forms added to palette must have a binding for the top-level component

The component that I try to add to a tab of a scrollpane, is a class that extends a JPanel.

I can not understand why this error. With other classes does not give me problems.

The error remains even if I select the two options.

Upvotes: 4

Views: 1711

Answers (2)

Tinus Tate
Tinus Tate

Reputation: 2365

I solved this by changing the "field name" of the JPanel of the form that is being inserted in another form.

It seems this error appears when no field name is specified which means the error is a bit misleading.

Upvotes: 1

swist
swist

Reputation: 1171

You may add the form to a pallet and then place it as a component on another form.

To do so open in a designer a form which you want to be custom component. Click right on any group (e.g. swing) and select "Add Component to Palette". After this you can open another form and place the newly added component on it.

Upvotes: 1

Related Questions