Inserting text into another program's text field using Java

520 Views Asked by At

I've searched the website and couldn't find an answer to a problem.

I'm trying to write a program in java that will input text and submit it into another java program.

So far, I know that one option could be using Robot but I think that would mean I would need to know exactly where the program's text box is on the screen.

Any suggestions would be appreciated, and if this would be easier to do in C++ I would be okay with that.

Thanks in advance for your help

1

There are 1 best solutions below

0
On

Without cooperation with the other java application, your only choices (both bad) are Robot and JNI