ConstructorParams (attribute)

From JAXXWiki

constructorParams is an attribute for class tags which specifies the parameters to pass to the constructor when the object is created.

By default, objects are created using their no-argument constructors. To use a different constructor, assign constructorParams a comma-separated list of parameters expressed as Java code.

Example:

<Color id='rose' constructorParams='241, 117, 117'/>
<JLabel text='Test Label' foreground='{rose}'/>

The above example is equivalent to the following Java code:

Color rose = new Color(241, 117, 117);
JLabel label = new JLabel();
label.setText("Test Label");
label.setForeground(rose);

To create objects which do not have a no-argument constructor, you must specify the constructorParams attribute.