Hello,
I am trying to create a toggle menu item using the AOM and DOM. I found
when trying to use:
public void setChecked(boolean checked)
throws WindowExceptionFor toggle menu items only. Shows
whether the toggle menu item is checked or not.
Throws:
WindowException - INVALID_MODIFICATION_ERR: Raised if the object is not
a toggle menu item.
I get an error because it is not a toggle menu. I am using the following
to create the menuitem:
public MenuItem createMenuItem(java.lang.String label)
Creates a menu item.
Parameters:
label - Specifies the label of the menu item. If this value is a dash
(-), the method returns a menu separator (a horizontal line) that
distinguishes groups of items on a submenu. Specify an access key in the
label by placing an ampersand ( &) before the character to be used as
the key. For example, to specify the F as the access key for "File",
specify the label as &File. The character that follows the ampersand in
a label is also known as the mnemonic of the menu item.
Returns:
The newly created MenuItem
But I can't find any documentation that tells me how to create a toggle
menu in AOM/DOM. I have searched documentation for toggle and only find
it in regards to setChecked() and getChecked() but can't find any way to
create a toggle menu.
Can anyone tell me what I am missing?
Thanks,
Deb