Java application help and suggestions required
I want to make a program in Java but very much confused that whatís the best solution, the following is the scenario:
The Java program which I have to make is continuously running in the memory like a windows service or process I mean when ever I start my computer the program starts running automatically at the back end. Now lets come to the actual problem, actually I have a third party software running on my PC which is basically a Java Swing Application, it contains simply a form and a text field, I donít have access to the source code or any API of the software by which I could have interacted with this application, now we have to apply some necessary validations on the value entered in the text field but sine we didnít have access to the source code or any API so I decided to develop a Java program for the solution, what my Java program(continuously running in memory) has to do is that when user enters some value in the text field of that software and than selects the value, after selecting the value when the user press ctrl+F1 key (pressing both ctrl and F1 keys together) than that selected value is inserted in the System Clipboard and than we can retrieve the value from clipboard, once this value is in our hand we can do any thing with it,
now my question is that how to transfer this value to the clipboard since for this purpose we have to access the selected text in the text field of the active window(Java swing application) than how can we access this active window or selected text using Java, this is just one solution which I have thought and trying to make it possible, please guide me that how can this be possible and what will be the best solution in this scenario.