Note: The code in the two files shown above is listed in the Pivot Starter Kit announcement on Javalobby.
I used a free-form project because the demo application comes with its own build.xml file. (A different approach would have been to open the demo application as a 'Java Project with Existing Sources' and to then copy the demo's build.xml over the one created by the IDE.) Here's the free-form project template:
When you're clicking through the wizard and selecting your sources, you can also map project commands to Ant targets from the demo's build.xml file:
To be able to use the IDE's editor features, you also need to register the demo app's libraries in the project's Properties dialog:
Then add a run target, which the demo app's build.xml doesn't provide:
<target name="run" depends="build">
<java classpathref="project.class.path" classname="pivot.wtk.DesktopApplicationContext">
You can now right-click the project and choose 'Clean', 'Build', and 'Run', which will call the Ant targets in the build.xml file.
Finally, run the application and you'll have this:
Or run the application as an applet (note the 'draggable' parameter below, for JDK 6 Update 10, in a browser to which that applies, such as FireFox 3):
<title>Pivot Starter Application</title>
<body style="margin:0px; padding:0px">
<param name="applicationClassName" value="pivot.starter.StarterApplication">
<param name="image" value="spinner3-bluey.gif">
<param name="centerimage" value="true">
<param name="boxborder" value="false">
<param name="draggable" value="true">
In both cases, when you click the button, you get this response (below in an applet):
Then, now that you have your sample up and running, continue your journey into Pivot by taking the Pivot tutorial!