Overview | Methods | This Package | All Packages
Adds an item to the checked list box.
Syntax
public final int addItem( Object item, int check )
public final int addItem( Object item, boolean checked )
Parameters
item
An object (generally a String object) whose toString method returns the string you want to display in the checked list box.
check
An integer indicating whether the check box for the item is initially checked, unchecked, or indeterminate. Possible values are constants defined in the CheckState class.
checked
Set to true to add an item whose check box is initially checked; set to false to add an item whose check box is initially unchecked. To specify that a check box is initially indeterminate (shaded), use the syntax that takes the check parameter instead of the checked parameter.
Return Value
Returns the zero-based index of the added item.