Constraints (attribute)

From JAXXWiki

The correct title of this article is constraints (attribute). The initial letter is capitalized due to technical restrictions.

The constraints attribute specifies layout constraints to be used when a component is added to its parent container. The constraints attribute is valid only on component class tags.

The value of constraints is interpreted as Java code and must result in an Object (or null).

Example:

<JPanel layout='{new BorderLayout()}'>
  <JButton label='North' constraints='BorderLayout.NORTH'/>
  <JButton label='South' constraints='BorderLayout.SOUTH'/>
</JPanel>