You use the Set Action dialog box to assign actions to visual components, such as menu items and buttons. In the dialog box, you also set resources for those actions, such as the text that appears on the component, tool tip text, and any icons that you want to associate with the action. Such resources are saved in a .properties file that is named after the class that contains the action.
You open the Set Action dialog box in one of the following two ways:
The Set Action dialog box consists of the following fields:
This help topic only covers the options in the default editor.
Only methods that have the @Action annotation are listed in the combo box. If you have a method that you want to use that does not have this annotation, exit the dialog box and add that annotation to the method.
If you have not yet written a method for the action, select Create New Action. This enables you to enter a method name in the Action's Method field. Also be sure to fill in the Text field with the text that you want to appear on the component. When you click OK to exit the dialog box, a skeleton action is created for you.
Note: When you assign an action to a component, that component's text, toolTipText, and icon properties are set according to what you have entered in the Set Action dialog box. If you have previously set these properties for the component, they will be replaced by what is specified in the Set Action dialog box. However, you can return to the property sheet for the component and customize the values that you want for that component. In the running application, the component-specific properties will be used.