Programmer's Guide > Interfaces > Component interface > text attribute
  
text attribute
The text associated with the component. The values vary according to the component type as follows:
Component Type
text
Dialog
title of window
Frame
title of window
MenuBar
#menubar
MenuItem
label of menu item
For menu items, you can specify an access key in the label by placing an ampersand (&) before the character to be used as the key. For example, to specify F as the access key for "File", you should specify the label as "&File". The character that follows the ampersand in a label is also known as the mnemonic of the menu item. The label for a menu separator is a dash ( -).
text
Access
read-write
Returns
String
Set throws
WindowException
INVALID_MODIFICATION_ERR: Raised if the new text is not valid for the component.
NO_MODIFICATION_ALLOWED_ERR: Raised if the text of the component cannot be modified.