Java Reference
In-Depth Information
Sketching a prototype in this way gives us the following advantages over coding the GUI
directly:
We can sketch a sample GUI quicker than we can write code to create a mock-up of the
application.
Following that point, if the end user would like a change made to the interface, you
won't have to throw out code.
The sketch can be shown to your sample audience/testers anywhere—you do not need
a computer handy.
When you show it to potential users, they will know that it is a sketch, and not a com-
plete application, whereas if you show potential users a mocked-up GUI, there is the
tendency for the users to believe that a large proportion of the work is complete.
Having made an up-front decision about what looks good, we are more likely to stick to
it. When coding without the up-front sketch, there is the temptation to change parts of
the design whenever it appears to difficult to do.
Having made an up-front decision about what will appear in the GUI, there is less
temptation to add more as we go along.
Just like assembling a puzzle, there are many ways to solve a single problem. The preced-
ing layout structure is, of course, merely the way we have chosen to lay out Denny's DVD
application—you might choose a totally different layout for your application. The Denny's
DVDs application interface takes a simple approach that incorporates very few additional
bells and whistles. A basic Swing implementation is all that Sun requires for the SCJD exam,
but you can choose to go above and beyond what is required and add more features than
required. A JToolBar , for example, could be provided for additional ease of use, even though
it is not specifically required to pass the exam. Whether to add such features is up to you. On
the one hand, there are many features that you can add that will make your GUI more user
friendly, and hence improve your score. On the other hand, your instructions may warn
against going beyond specifications. Where to draw the line is up to you.
When we look at the sketch in Figure 8-22, we can see that there are three major areas
(excluding the title bar and menu bar), as shown in Figure 8-23.
Figure 8-23. The three main areas of the client GUI application
Search WWH ::




Custom Search