Example:
var parent = UIUtils.findComponentByName( Eons.window, "fileMenu" ); var menuItem = new swing.JMenuItem( "Now You See Me" ); menuItem.toolTipText = "Choose me to remove me from the menu"; menuItem.addActionListener( function( event ) { parent.remove( menuItem ); }); parent.add( menuItem );
parent | the root of the component tree to search |
name | the name to search for |
returns the subcomponent of parent with the specified name, or null
Example:
UIUtils.printTree( Editor.contentPane );
parent | the root of the component tree to print |
prints a component tree
c | the component to find the window of |
returns the window that contains the component