Converting an Application to Swing and Serialization

This document covers the steps to convert Java applets and applications to 100% Swing-based, serializable equivalents. Flexible JAMM can only share applets or applications that are 100% Swing-based and serializable.   Following these guidelines will allow most, but not all, applets or applications to be shared with Flexible JAMM.  See Flexible JAMM Known Problems for information about types of applets that cannot be effectively shared with Flexible JAMM.


What is Swing?

Swing is the user interface library of the Java Foundation Classes. Flexible JAMM uses Swing, and does not support the older Java interface library, the Abstract Window Toolkit (AWT), for several reasons.  Swing is a more complete interface library than the AWT and will be a part of the core Java library in version 1.2 (it is currently available as a free, but separate, package).  We expect to see Swing supplant the AWT as the default user interface library for Java applications.

 Converting to Swing

This section describes how to convert a Java 1.1 applet or application to Swing.

Pre-conversion Requirements

Class Name Changes

Primary Differences Between AWT and Swing APIs

Unexpected Differences between Swing and AWT

What is Serialization?

Serialization is the process of transforming an object and its state into a stream of bytes which can be transferred or stored for later reconstruction. Flexible JAMM uses serialization to send a copy of a shared application to new-comers to a collaboration.

Making Classes Serializable

In most cases, making a class serializable is straightforward. Much of the core Java library, and all of Swing, is serializable.  Your classes that inherit from serializable classes are also serializable. For other classes, simply declaring a class as implementing the interface is often all that is necessary. However, some applications are not as trivially serializable.  Here are the steps to follow to make your classes serializable.

Flexible JAMM User's Guide
Flexible JAMM Home

Last modified: Mon Sep 7 13:37:04 EDT