Item (tag) |
From JAXXWiki
The <item> tag is used to specify values for the <JComboBox>, <JList>, and <JTree> tags.
Contents |
[edit]
Attributes
| Attribute | Type | Description |
|---|---|---|
| label | java.lang.String | The string used to represent the value (when the default renderer is in use). If label is not specified, value.toString() is used instead. |
| value | java.lang.Object | The item's value, which appears in the component's model. Use data binding expressions to specify values of types other than String. |
| selected | boolean | The initial selection state of the item. Defaults to false. |
[edit]
Child tags
When used in a <JTree>, <item> tags form a nested heirarchy which reflects the actual tree structure. Therefore in <JTree>s, <item> tags may contain other <item> tags.
[edit]
Data binding
As with class tags, all of the <item> tag's attributes may be assigned data binding expressions, and updates will be properly reflected in the on-screen item's appearance.
[edit]

