I’ve recently been messing around with the Eclipse Visual Editor to create a helper application for a friend’s online store. This application will be kind-of a remote inventory tracking utility. He attends a bunch of fun flies throughout the year. While at the fun fly he doesn’t have any internet connectivity and as he sells stuff he has no way of keeping track of his inventory. He is wanting a way to scan items as he sells them and then when he gets home to be able to update the website inventory easily without having to inventory everything. He uses both Windows and Linux so a multi-platform product is required, which is why we’re using Java.
So with this cross platform, application quest (remember I’m a Java newbie) I downloaded the newest version of eclipse, installed the Visual Editor from the Callisto project and started designing the user interface for the app. The whole process is pretty much a drag-n-drop affair and the tool writes all the code required as you place elements. Once you’ve created your user interface, you add events and then you have to write the code for the events, pretty simple.
Now, my entire experience with this product has been great. It would have taken me forever to write the UI manually and I would have probably ended up with a lot of unused/unneeded code in the process. This whole thing has been a great learning experience for me. Now while this would probably be considered a simple application, it entails reading/writing external files, reading/setting configuration variables from a config file, connecting to and manipulating the data in a mysql database, reading the data from a mysql database and showing dialogs for various confirmations and settings which were built as seperate modal dialogs with the visual editor.
I think the only thing that I’ve had trouble with was trying to manually compile the app as my classpath wasn’t exactly right and the visual editor doesn’t create a main method for you, so in order to run it as a Java application you have to write a main method. While this caused me some grief in the beginning, looking over the The Java Tutorials and other sources on the internet I was able to get it to run as a java application with minimal effort.
Of other interest is exporting the app to an executable jar file that can be run easily without having to run it from the command line or write a batch file to run the app. It took me a while to get this to work but I think that the problem was again my classpath.
I’ve included a screenshot of the visual editor below for your enjoyment….