Getting Started

The best way to get started coding with fiswidgets is to look at the example code and take off from there. These notes are very sparse and will be expanded as we get more user feedback.

The fiswidgets API is designed to be very, very easy to code with. (You have traded flexibility and breadth for ease and speed.). To program with fiswidgets, you really should have some experience coding in C, C++, or Java. If you haven't coded in Java before, but at least have an idea of how object oriented coding works, you may be able to extrapolate from the example code and your C, C++ knowledge successfully. We strongly recommend the "JAVA in a Nutshell", by David Flanagan, O'Reilly series book as a reference if you haven't used Java before.


To write a fiswidget application

You need to write 2 Java classes (ie 2 "programs"). First, you write a FisBase class. This is the program where you specify all the widgets that will appear in the GUI. Then, you write a FisRunManager class. This is the program where you specify what happens when the user clicks on the RUN button.

To compile and run a fiswidget application

You need to have both the Fiswidget classes in your CLASSPATH.

The fiswidget components use the Swing components, so you need to install Swing (aka JFC, Java Foundation Classes) on any machine that uses fiswidgets. You should not have to worry about that since Swing comes with the JDK for Java versions 1.2 and higher.

You also need to have the fiswidgets-system and fiswidgets-all jar files in your CLASSPATH. For example, if you have installed fiswidgets in /usr/local/pkg/fiswidgets, you need to add /usr/local/pkg/fiswidgets/fiswidgets-system.jar and /usr/local/pkg/fiswidgets/fiswidgets-all.jar to your path.

Finally, since you are creating a new Java class (your fiswidget) in the current directory, you will need to add the current working directory (.) to your CLASSPATH.

In order to run the Java compiler (javac) and the Java interpreter, (java), you need to add the Java bin directory (usually /usr/java/bin) for your site to your path.

So, the instructions to set up your environment, compile your fiswidget, and run it might look like:

set path = ($path /usr/java/bin)
setenv CLASSPATH /usr/local/pkg/fiswidgets/fiswidgets-system.jar:/usr/local/pkg/fiswidgets/fiswidgets-all.jar:.
javac MyApp.java MyAppRun.java
java MyApp