Java Reference
In-Depth Information
Creating the front-end can be a daunting task, especially for those who are primarily not
front-end developers. There are many Java developers who never write a line of interface code
but who are still extremely fluent programmers in general. This is further exacerbated by the
fact that only a limited textual description of the interface is provided; we have not been given
any examples of what the end user would like to see. The crux of the next two sections is to
ease the burden of developing the GUI.
Layout concepts are discussed at a high level, in addition to some basic human interface
concepts that can be incorporated into the interface for the SCJD exam.
Note Layout concepts and human interface concepts are courses of study unto themselves. The next two
sections only introduce ideas of relevance to the SCJD exam.
Layout Concepts
It is a common misconception that GUI layout is more an art than a science. This is a slight
misrepresentation of the process of layout design and information architecture. In the early
days of computing, computer programming was considered more of an art than a science.
This fact seems almost ludicrous by today's standards. It was only after an engineering process
was applied to the art of programming that it quickly became more of a science or an engi-
neering practice. The same can be said for interface design concepts.
Layout design revolves around the presentation of information in a clear and concise
manner. The user should be able to process the information a user interface presents with
little or no effort. This last statement is vague, but for a reason. No matter how standards ori-
ented a process may become, there is always a level of intuition in decision making. Not all
roads can be anticipated and laid out in a standard process. Intuition is where the art of layout
design comes into play, in deciding how to deal with those gray areas of development where
no one has treaded before.
Fortunately for us, many have treaded into the design considerations presented in the
SCJD exam. In fact, the layout of data has become so standardized that Sun actually includes
a Swing component, the JTable , to deal specifically with this “database”-style data. Sun even
goes so far as to require the use of the JTable component for the SCJD exam. The JTable
component, which is discussed in detail later in this chapter, is the main method of data
presentation in this topic's example application.
On a high level, let's take a look at how the JTable efficiently displays data. The JTable
uses the spreadsheet paradigm of presenting items divided into rows and columns. This
spreadsheet-style layout is illustrated in Figure 8-1. Notice that when users need to locate
data under this paradigm, they only need to cross-reference a column value with a row value.
Where the two values intersect is the location of the data. The paradigm also is the ultimate
reconciliation of data versus display space. If another row of data is added to the table, the
size will increase by approximately the height of the font used. Adding an additional column
impacts the size of more than a row, but the layout is extremely flexible, so updates to the
underlying system data are easily represented in the presentation. In addition to all of these
features, the table schema presents a great quantity of data in a very small area.
Search WWH ::




Custom Search