I am trying to make a small program that fills the username and password field for the application below and press the green button:

What would be the best approach ? I was thinking to the Java Robot class – though I don’t know if it
can do this.
Are there easier/better ways ?
Robot class is good way, it perfectly fits this purpose, but you have to determine somehow coordinates of fields, you want to fill. I would probably check every screen pixel (also Robot class) looking for a specific color (green pixel from accept button or yellow pixel from cancel button, or better their combination) and then calculate positions of input fields