Is there anything in Java AWT that has a unique id for each component? I need it to be similar to the AutomationId in the UI Automation library from C#. It just needs to be unique among siblings. It doesn't need to be globally unique. I just need it so that I can save the path to a GUI component while it's running a开发者_如何转开发t some point, and then if I restart the application at a different time, I can find the component.
Is this possible using Java AWT?
I don't know of any identifier, but usually the layout depends on the order of the components, so you can identify a component by its index in its container's getComponents
array.
精彩评论