Java Reference
In-Depth Information
Chapter Summary
In this chapter, you were introduced to writing data to a data file on disk. You
learned how to construct an interface window and set attributes for the size,
location, and Look and Feel. You then learned how to add JLabels, JTextFields, a
JButton, and JPanels to the interface. Next, you learned how to use multiple sub-
setted layout managers to place components in the window and wrapped the
data from the FileOutputStream inside the DataOutputStream to construct a
new file. To incorporate additional functionality and user-friendly features, the
chapter showed you how to create several JOptionPane boxes to inform users
when data was submitted successfully, as well as to warn them when a field was
left empty. The file name had the system date appended to it. Then, using the
writeUTF() method, the chapter introduced you to transferring data from the
interface to the data file.
You also were introduced to methods for verifying the existence of the data
file, as well as procedures to view the data file. Finally, you learned about client-
server architectures, the core of information technology from databases to the
Web. You also learned that two-tier, three-tier, and multitier systems allow for
protection of databases and world access.
What You Should Know
Having completed this chapter, you now should be able to perform the tasks
shown in Table 8-13.
Table 8-13
Chapter 8 What You Should Know
TASK NUMBER
TASK
PAGE
1
Start a New Java Program in TextPad
492
2
Create the BillPayer Window
497
3
Test the Functionality of the Window
498
4
Construct the Components
500
5
Set the Layout Managers
501
6
Add the Components to the JFrame
503
7
Test the Layout Managers
504
8
Open the Data File with a Unique Name
511
9
Code the actionPerformed() Method
513
10
Code the checkFields() Method
515
11
Code the clearFields() Method
516
12
Test the Program
517
13
Verify the Existence of the Data File
520
14
Quit TextPad
523
 
Search WWH ::




Custom Search