For testing Swing UI, Jemmy is a really great tool. Some info about this can be found at
http://wiki.netbeans.org/Jemmy
and
and this is really useful powerpoint presentation I googled across:
Here
Another great tool is Fest-Swing , this uses Robot to generate Input Simulation.
I prefer Jemmy as it provides the option of using either Event Dispatching (events are programmatically created and dispatched onto the Event Queue) or Robot (using the Robot class to control the mouse and keyboard, generating native OS events like a real user using the UI) method for input simulation.
When you run the Tests on the Continuous build system, using Event Dispatch (the default mechanism for Jemmy) , it means you don’t need to have the process running inside a logged in windows desktop (it will still work even when it’s run as windows service account). The other advantage of Event Disptaching mechanism is that you when run the automated tests on your own machine you do not have to worry about your mouse and keyboard being taken control by the automated tests.