JavaOne Conference Trip Report

Project Swing Component Architecture

First, they announced that JFC is certified 100% Pure Java.

In JFC, models are represented as interfaces, so we have model and view/controller. The names of models end in "Model". There are default and abstract classes for complex models. Given plugable look-and-feel, dynamic look-and-feel just happened, it wasn't a design goal, and it isn't completely there yet (it requires some work beyond the components). Use delegates - the ComponentUI class is subclassed for each component. The three big methods are setUI, setUIClass and createUI for look-and-feel stuff. All components are containers. The Swing shipped with V. 1.2 will be completely serializable. There will also be complete BeanInfo for each component; arbitrary info will be added for IDE support.

If you use threads, only use Swing in the dispatching thread. To see the latest docs, go to http://java.sun.com/products/jfc/swingdoc-current/.

IBM is leading the pack on accessibility technology with Java. The API docs provide very complete info; the Accessibility API was used to test Swing. You can send e-mail to access@sun.com to discuss accessibility.

Most of the time, when you modify the look-and-feel, you'll use a plugable look-and-feel, and these are multiplexed, so you can change just the parts you want to. The easy way to change it is to modify the main hash table for look-and-feel values. If you need to go further, you can subclass off the look-and-feel classes to make substantive changes.