Java Reference
In-Depth Information
The bold items represent controls not available in AWT. At some point, the engineers at Sun must
have decided that these new items were standard and useful enough to include in the default set of
controls. While it is true that AWT represented the intersection of controls from all the platforms
supported by Java in those days, and thus was limited by cross-platform constraints, it is still interesting
to see AWT lacked a radio button. There are some other interesting additions, such as the toolbars and
trees. These components are so common now—it's hard to imagine life without them.
The list of Swing components also shows a paradigm that is now almost extinct, the JDesktopPane .
This component, in conjunction with JInternalFrame , allowed the application developer to create a
windowed environment inside a host window of the OS. This paradigm was very popular at one point,
but today, it is considered bad form. The argument for not using windows within windows is something
like, “The OS already has windows, why make the user manage another set of windows that might work
slightly differently?” I think this is a valid perspective, but of course there are always exceptions and
plenty of applications out there work this way today.
Regardless of the exact set of controls available, there are still numerous decisions on how those
components are laid out. Consider the humble login dialog found in many applications, composed of a
few labels, two text fields and a button or two. Figures 1-1 and 1-2 show two different login dialogs.
Figure 1-1. Firefox login dialog
Search WWH ::

Custom Search