June 2004
Beginner to intermediate
364 pages
7h 38m
English
You want to disable menu items whose selection is inappropriate.
To enable and disable menu items, use the MenuItem
class’s setEnabled method.
You can pass a boolean value to the setEnabled
method; true enables the item,
false disables it.
Recipe 9.7 on creating a menu system; Recipe 9.8 on creating text menu items; Recipe 9.9 on creating image menu items; Recipe 9.10 on creating radio menu items; Recipe 9.11 on creating menu item accelerators and mnemonics.
Read now
Unlock full access