I'm saving files from the Application, and have this save window:
Here to press "OK" button I used next method:
Robot robot = new Robot();
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);
After this window Java Loading application to open it:
And After this I have this window and previous code doesn't work here, I can't press Enter: Who know how to Click on "Run" on the last screenshot?
I think again it will be a lot easier to use Sikuli for the job. You can do it with the simplest hello world example- http://doc.sikuli.org/tutorials/helloworld/helloworld-win.html