Java Reference
In-Depth Information
Figure 1-3. Hyperbolically bad login dialog
Figure 1-3 has exactly the same components as the dialog in Figure 1-2. The only difference is the
layout, but the layout is so poor that no one would ever actually create a dialog like this. I presented an
example this hyperbolically bad so there could be no arguments about its merits. The dialog in Figure 1-3
might even be perfectly functional in the sense that if you filled out the right information you would be
authenticated. But the number of users who would be stopped in their tracks is very high.
Of course, most applications are considerably more complex than a single dialog, but I think the
point holds about fulfilling user expectations when possible.
Graphics
Given a set of controls, there are numerous ways to lay them out on a panel. There are also numerous
ways to draw each component. Every modern GUI toolkit allows the developer to customize the look of
each component. For example HTML has CSS to control the layout and look of the components on a
web page. Java's Swing has the concept of a LookAndFeel class. As any Swing veteran knows, Java comes
with a number of look and feels built right in. Generally, the look and feels fall into one of the following
categories; legacy, cross-platform, native, or customizable.
By examining the Java look and feels, you can get a sense of how the look of components has
changed over the years. Just like the set of components has changed over time, the look of those
components has evolved as well. Figure 1-4 shows several Swing look and feels, the default JavaFX look,
Search WWH ::




Custom Search