This property provides a scripting interface to the main menu created with the Java Development Kit.
Supported component versions: Java 7, 8, 11 and 17.
|TestObj||A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section|
The property is applied to the following object:
To view this property in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.
Menu object that corresponds to the Java main menu.
After you obtain the menu, you can select items from this menu using the returned object. See the
Menu object description for more information on available menu actions.
There are two ways to obtain the main menu of a Java application:
- Via the
- Via the
Accessing the menu through the
JMainMenu of a
Window object is convenient, however if a window has several menus, you might encounter recognition problems. In this case you should use the
JMenuBar object. The instances of this object are available for every menu bar of a Java application and addressing the instance that corresponds to the main menu solves the problem.
This property is available if the Java Control Support plugin is installed.
PopupMenu Property (Window Objects)
Java Swing Menu Bar Support
Simulating Menu Actions