Java Reference
In-Depth Information
Using a file name such as BodyMassSwing.java instead of BodyMassVersion2
.java more closely represents the purpose of the program and is easier to remem-
ber. To change the file name in the program code, you can use TextPad's search
and replace function, which makes global changes to text easy.
The following steps edit the file name and class header to reflect the new file
name.
To Edit the File Name and Class Header
1. With the TextPad coding window displaying the BodyMass source code,
click Search on the menu bar.
The Search menu is displayed (Figure 3-24).
Replace
command
Search menu
FIGURE 3-24
2. Click Replace on the Search menu. When the Replace dialog box is
displayed, type BodyMass in the Find what text box. Press the TAB key.
Type BodyMassSwing in the Replace with text box.
TextPad will find and then replace every occurrence of the text, BodyMass,
with the text, BodyMassSwing (Figure 3-25).
Replace
dialog box
Find what
text box
Replace with
text box
Replace All
button
text to be
replaced
FIGURE 3-25
(continued)
 
Search WWH ::




Custom Search