Abbot helps you test your Java UI. It comprises Abbot, which lets you programmatically drive UI components, and Costello (built on Abbot) which allows you to easily launch, explore and control an application. The framework may be used with both scripts and compiled code.
This overview of the Abbot system will give you an idea of the different system components and how it is used. There is also some background concerning the issues involved with Java GUI testing.
You can see what Costello (the script editor) looks like or try it out via Java Web Start by using the links to the right. The screen shot shows a sample application, its UI hierarchy, and some component properties as displayed by Costello.
JUnit is used as the controlling harness for running tests and suites of tests, but scripts can easily be wrapped to run in other environments. Scripts may also be used to create a demo or tutorial for an application. You can drive the actual application and provide popup annotations while it is running.