Menu

#75 Finder.findComponentList() does not find JMenuItems

open
nobody
None
5
2005-12-07
2005-12-07
Anonymous
No

The Finder class method findComponentList does not
find JMenuItems. The reason is that the method
"getComponents()" on a JMenu will not return the items
in the menu.

FIX:

One possible fix is to change:

Component[] children = cont.getComponents();

to:

Component[] children = null;
if (cont instanceof JMenu)
children = ((JMenu) cont).getMenuComponents
();
else
children = cont.getComponents();

Kind Regards
Carsten Andersen
asmagin@hispeed.ch

Discussion


Log in to post a comment.

MongoDB Logo MongoDB