I want to test my GUI, aside from JUnit testing and other formal testing techniques how can I simulate buttons being pressed, keyboard input etc. The only that springs to mind for me is using the Robots class though not sure if there is a better alternative.