How to use set values in multiple fields simultaneously?

Is there any way to set values in different fields of form simultaneously? E.g. in login screen, enter values in email Id and password fields at once, instead of entering sequentially. It would be great if you can tell how to do in java.