Package com.ms.awt |
![]() Previous |
![]() Microsoft Packages |
![]() Index |
![]() Next |
public class MenuBarX extends MenuBar implements MenuXConstants { // Constructors public MenuBarX( MenuItemX items[], int nItems); public MenuBarX( MenuItemX items[], int nItems, Applet theApp, String param); // Methods public int getItemID(String s) }
The MenuBarX class creates a menubar and assigns the given menu items to it.
public MenuBarX( MenuItemX items[], int nItems)Creates a menubar for the given applet consisting of the given number of menu items.
Return Value:
No return value.
Parameter Description items An array of menu items to add to the menu. nItems The number of items defined in the items array.
public MenuBarX( MenuItemX items[], int nItems, Applet theApp, String param)Creates a menubar for the given applet consisting of the given number of menu items, the labels for which are found as resources in the given applet.
Return Value:
No return value.
Parameter Description items An array of menu items to add to the menu. nItems The number of items defined in the items array. theApp The applet containing the menu item labels, stored as resources. param A resource identifier of the label for the first menu item to add. Can set to null.
public int getItemID(String s)Retrieves the identifier for the menu item having the given name.
Return Value:
Returns the identifier if the item is found, -1 otherwise.
Parameter Description s The name (label) of the menu item.