Programming a graphical user
interface (GUI) with Java has the huge advantage of having
a built-in standardized GUI code library. The most basic Java GUI class
is called the Abstract Windowing Toolkit (AWT). The AWT has all
the basic UI components for building applets and applications on
a modern window-based platform. Buttons, checkboxes, scrollbars,
textfields, listboxes, comboboxes, and more are included in this
class package. It will also run on the subsets of Java intended for
hand-held devices (Personal Java), which in general is not the case for
the more extensive Swing API.
Since JDK 1.1, AWT relies on the JavaBeans event model,
and the days are gone when developing applets on the web meant ensuring
backwards compability towards the (buggy) JDK 1.0 event handling in
some browsers. Today the problem is instead ensuring that the internet
user's browsers have Java support at all.
Java Foundation Classes, and more specifically the most
known and used subset of it: Swing, is
a class library that is written in 100% Java and is included as a
standard package since JDK 1.2. Swing has all the higher-level UI
components, e.g. treeview, toolbar, tab-folder, tables, progressbar,
imagebutton, and more..., as well as a practical MVC design of the API,
making it possible to write reasonably manangeable applications.
Another important matter
concerning user intefaces, is that it is possible, even easy, for a
company to design and implement an corporate-unique
custom intuitive GUI for their Swing-based interfaces.
is also an Omnisoft specialty - our spinpanel navigation components,
and text-tv frameworks are examples of this. All the UI components in
the TextTV Framework are specially
designed and built, have a unique "look", but have
still the same "feel" as a standard windowing UI.
The Java AWT classes are generalized and thus platform
independent - the same
Java source code will be
automatically "ported" to Win32s , Unix, Mac and other
platforms. Since JDK 1.1 the components are lightweight, avoiding the
problem of having to debug GUI issues that actually belong to the
underlying OS, which was one of the main problems with the original
peer based approach. For a while (during JDK 1.1) this also meant
losing the inter-application clipboard capabilities that the original
(peer based) GUI approach had acces to. But since JDK 1.2 and forward
this is no longer an issue.
An often forgotten advantage
over e.g. C++ is that all the basic necessary UI components are
part of the core Java standard and hence are included in all the
JVMs and browsers that support the appropriate JDK version. The
AWT classes are low-level UI components, the building blocks of
the high-level JFC components.
The developer needs only to
write once, and the tester may run anywhere. The multi-platform
support is constantly being enhanced and optimized, but though
this being done in the JVM, the "same old" Java AWT
source, on the "same old" PC, will run better and
better, with improved JVM (and browser) upgrades.
Java Foundation Classes, including Swing, is the second
Java GUI and has been around since JDK 1.1 (as an extension package,
and as core since JDK 1.2) and include standard high-level components
that a GUI
developer is used to, from e.g. one of the many C++ GUI
libraries. Swing, being built on top of AWT, is platform independent.
All Swing Components are
Java Beans. We seem to take this for granted today, and tend to
forget how revolutionary this concept once was, making it easy to
create your own RAD components to be included in and used with any Java
More information about JFC/Swing can be found at Sun's
Java Custom UI
Support for advanced
graphics programming is included in the JFC Java 2D
API and in the
Java 3D API. But even with only the standard AWT almost anything
which is nicely demonstrated by Omnisofts TextTv Framework.