AWT Overview | Developing AWT applications for MI
MI's programming model for non-browser applications is AWT, but Swing is also supported: any Swing application can be MI-enabled. For a quick start on Swing, please consult http://java.sun.com/docs/books/tutorial/uiswing/mini/index.html.
As AWT applications, Swing applications are launched from the MI AWT Panel. That your Swing application can be launched by the MI, you need to implement the method AwtApplication.getRootPanel(). This methods returns the Panel, that MI then launches for the application. If your application returns an instance of JApplet, which is a subclass of Panel, your Swing application will be started in this JApplet.
Furthermore, you need to ensure that the Swing libraries are included into your application, as they are not included into the MI Client Component
The key reason for choosing AWT as the standard for MI is a performance argument: Swing applications are considerably slower than AWT applications - even on desktop PCs. Furthermore, Swing needs considerably more system resources than AWT, which is not tolerable for PDAs.
Another reason is compatibility and availability on all platforms supported by MI: AWT is a standard part of the Personal Profile that is the runtime VM for MI. Even though an early version of Swing (namely 1.1.1.) should work with any JVM 1.1.7 or higher, not all PDAs support Java 1.1.x. Furthermore, Sun Microsystems has discontinued support for Java 1.1.8 and Swing 1.1.1 as of 10/09/2202.