Java Reference
In-Depth Information
The design decision therefore shifts from what GUI widget is appropriate for use in the
Denny's DVDs application to how to properly incorporate the JTable into a Swing user inter-
face. The solution we suggest in Chapter 8 is the application-level use of the MVC design
pattern. As you learned in Chapter 8, Swing components, such as the JTree and the JTable ,
implement the MVC pattern internally, but the choice to use the MVC pattern beyond these
components is entirely up to the developer. The main benefit gained through the use of an
application-wide MVC architecture is increased abstraction between the data display and the
actual data implementation. The JTable and its own MVC implementation in turn becomes a
smaller player in the overall application display layer and works in cooperation with the appli-
cation's MVC implementation.
Locating the Code Samples
You can find the code samples for this topic in the Source Code section of the Apress web site
( http://www.apress.com ). There you will a zip file with the final code base (i.e., Denny's DVDs
version 2.0). In this chapter you will be concerned with the version 2.0 zip file.
Unzip the final code base in the location of your choice on your machine. There should be
one directory, sampleproject , which contains four directories: db , remote , sockets , and gui .
These directories correspond to four packages:
sampleproject.db
sampleproject.remote
sampleproject.sockets
sampleproject.gui
Unless you've skipped around quite a bit and started out with Chapter 9, you should be
very familiar with each of these packages. Once you've unzipped all of the Java source files
into something resembling the preceding directory structure, you're ready to compile the
application.
Compiling and Packaging the Application
Bring up a command prompt and type java -version . Make sure that you are using J2SE 5 or
later (see Figure 9-2). If you aren't, please download it and install it from the Sun J2SE down-
load site ( http://java.sun.com/j2se/1.5.0/download.jsp ).
Note The “b05” shown in the version number in Figure 9-2 indicates that this is build number 05; it does
not imply a beta version of the software.
Search WWH ::




Custom Search