It depends how you wish to receive events. The above link provided might help for JMenus (and I'd recommend going to the newer API, rather than a 10 year old one). The following might help as well...