I have created a Swing UI and the UI contains a frame, a panel and may be more components like buttons and text fields. I have speech recognition enabled for this UI. So, the user can say "set the background of the frame, a, to black". Now my problem is when the user says the above line I need to detect what component the user is talking about. I know the component name is 'a' but how do I get that component? Can someone tell me how to do this?