|Creates a new popup menu, which can then be shown over a component on a mouse event. To use this function, first create a Python sequence whose entries are strings, and another sequence whose entries are function objects. The strings will be the items that are displayed in your popup menu, and when an item is clicked, its corresponding function will be run. Passing in a function of None will cause a separator line to appear in the popup menu, and the corresponding string will not be displayed. Your functions must accept an event object as an argument. See also: Functions. It is best to have the menu object created only once via an application specific library function. Then, call the show(event) function on both the mousePressed and mouseReleasedevents on your component. The reason for this is that different operating systems (Windows, Linux, MacOS) differ in when they like to show the popup menu. The show(event) function detects when the right time is to show itself, either on mouse press or release. See the examples for more.|
This scripting function has no Client Permission restrictions.
PySequence itemNames - A list of names to create popup menu items with.
PySequence itemFunctions - A list of functions to match up with the names.
JPopupMenu - The javax.swing.JPopupMenu that was created.