aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Conversion of AccessibleComponent to Component Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Conversion of AccessibleComponent to Component" Watch "Conversion of AccessibleComponent to Component" New topic
Author

Conversion of AccessibleComponent to Component

suparna.venkat
Greenhorn

Joined: Oct 05, 2005
Posts: 7
Hi All,
The objective is to obtain the parent as a Component for a JMenuItem.
For ex:
I have a menu which has menuItems added to it and also a submenu added to it.
I should be able to get the parent component associated to the sub menu.
Iam able to retrieve the name of the parent for a sub-menu but not the component.
for getting the Parent name Iam using:
subMenu.getAccessibleContext().getAccessibleParent().getAccessibleContext().getAccessibleName();
Through the above code Iam able to get the parent associated to the subMenu.
but Iam looking for is to retrieve the parent as a 'component'

We can also retrieve the
subMenu.getAccessibleContext().getAccessibleParent().getAccessibleComponent()>>>>>>Here we can retrieve the AccessibleComponent but iam not able to get the Component or the JComponent from the AccessibleComponent.

Please help me out with this....
Please let me know if Iam doing a around about and if tehre is any direct or easier way to obtain the parent Menu(component ) associated with the sub-menu,
Thankyou in advance.
 
wood burning stoves
 
subject: Conversion of AccessibleComponent to Component
 
Similar Threads
Custom vertical slide navigation component in javascript.....
Navigating menu hierarchy in a JPopupMenu
Retereive data by ORDER BY
Main menu / sub menu
How to check duplicates in hashmap