Create an empty window in your project, name it something like Nav/Null
, then add this to your Client Startup Script:
window = system.nav.openWindow("Nav/Null")
from javax.swing import SwingUtilities, JMenuItem
root = SwingUtilities.getRoot(window)
root.setResizable(False)
system.nav.closeWindow(window)
menu = root.getJMenuBar()
From menu
you can use any of the methods of JMenuBar
, eg: https://docs.oracle.com/javase/7/docs/api/javax/swing/JMenuBar.html#getMenu(int)
Once you have a reference to the ‘Help’ menu (probably, just use the overall child count) you can add a menu:
from functools import partial
def handleSelect(event, target):
import system
system.nav.swapTo(target)
menuItem = JMenuItem("About MyApplication", actionPerformed=partial(handleSelect, target="My Window Name"))
submenu.add(menuItem)