Visual Cafe Tips and Traps

Home Up Search Java 2 API C++ Resources

Don't delete VC-created comments!

VC uses the comments it creates to enable it to parse the code and build the visual rapid application development ("RAD") window that graphically shows the placement of GUI elements.  Deleting these comments will break the parser and make the RAD window inoperable even though the code compiles and runs fine.

Avoid making changes to the code section that declares and initializes GUI elements. 

VC is very picky about the syntax used to declare and initialize the GUI elements that it created.  Seemingly innocuous changes to the code can break the GUI parser.

Avoid using VC's interaction (event) wizard.

VC makes only semi-JDK 1.1 compliant code.  It does properly attach listeners, but then takes all the calls and routes them through a central "switch point" routine, ala JDK 1.0 event model.    It would be better to write and attach your own listeners by hand.

Be sure that the latest JDK is before VC's on the classpath.

VC's implementation of the JDK is an out-of-date version plus has a few bugs in it.  

Avoid VC-specific GUI elements--stick with pure AWT elements. 

If you use only pure AWT graphical elements, then your code will be more likely to be able to be compiled and run using the standard JDK environment if necessary (e.g. on the Unix systems by graders).   If you need to use VC components, consider copying them into a sudirectory in your project and bundling it with your code.