Hello
I am trying to come up with a little tool to tag components on a user interface. Here's the strategy I am following:
I take a component and traverse into it and find out the components in it and obtain its name. Thereby associating a tag to the component.
Now I have a little problem in achieving this. I cannot find out if the particular component contains any further components or does it exist by itself.
Let me take an example. Assume a user interface to contain two panels on the root panel. each panel has two buttons and a label. Now at the top level i will have to assume that its a panel and then go into it. In fact if someone just puts a button on the root panel then this strategy would fail.
Does
java provide any APIs to access the tree structure of the user interface components. Presently I am aware of getComponentCount which provides the number of components on any container.
Please suggest some hooks if available.
Regards
Sat