The Java JBuilder2 Bible
Errata Page
This page
Missing Quotation Marks in the First Printing of the Book
Please add quotation marks where instructed.
p. 70:
- The two code lines at the bottom of the page: "This is your string."
p. 71:
- The bold lines: "Hello World"
p. 90:
- At the bottom of the page: "Buffy"
p. 94:
- The two code lines at the top of the page: "George"
p. 95:
- The two code lines at the top of the page: "George"
p. 196:
- Near the bottom: "This text "
(one space between "text" and the final quote)
p. 212:
- At the top of the page: ("Word " + count + ": " + sWord);
p. 222:
- Near the bottom: ("Word " + count + ": " + sWord);
p. 234:
- Near the bottom: (""+count)
- At the bottom: (""+avg)
p. 258:
- Near the top: "b evaluates to true";
- The middle of the page: "b evaluates to true";
p. 271:
- The quotes around each entry in the list in the middle of the page: "a",
"an", "and",... (21 entries)
- Near the bottom: if (s.equals("")) {
p. 276:
- Common words array, upper middle of the page: "a", "an", "and"
p. 279:
- 21 code lines: ht.put("a", ""), etc.
p. 285:
- String of punctuation characters near the top: ".,?!:;\"()$-" (Note
the \" sequence inside this string)
- String of whitespace characters under it: " \t\n\r" (Note the space
after the starting quote)
p. 286:
- Near the top: if (sWord.charAt(j) == '\'') { (single quote, backslash,
single quote, single quote)
- At the bottom; same sequence
p. 288:
- At the top of the page: char: 'a', '\n', '\377', '\u00A' byte: 'a',
'\n', '\377', '\u00A'
- Middle of the page: i = '\n';
(single quotes around backslash-n)
p. 289:
- Bottom of the page: char ch = 'a';
p. 291:
- Middle of the page: if (sb.charAt(i) == '\n') sb.setCharAt(i, ' ');
(single quotes around \n, single quotes around a space)
- Further down: if (sb.charAt(i) == ' ') lastSpace = i;
(single quotes around a space)
- Further down, in bold: sb.setCharAt(lastSpace, '\n');
- Further down, in bold: sb.insert(i++, '\n');
p. 292:
p. 293:
- At the top: sb.insert(i++, '\n');
p. 330:
p. 348:
- Near the bottom:
...getBundle("fsm.Res");
- Next code line: "State Machine Demo"
- Last code line: "State Machine Demo"
p. 482:
- In step 5, the labels in the property table columns are not lined up properly.
The table should read:
Name Label Enabled
btnNew New Game true
btnPass __Pass__ false
p. 526:
- Bold text, lower middle: lblMessage.setText("I must pass.");
- A few lines down: lblMessage.setText("Moving...");
- Near the end: lblMessage.setText("Your move.");
- At the end: lblMessage.setText("You must pass.");
p. 528:
- Bold text near the top: lblMessage.setText("Your move.");
p. 529:
- Bold text near the top: "Wait your turn!"
- Further down: "Move to an empty square!"
(should be indented, as well)
- Further down: "You must flip something!"
(should be indented, as well)
p. 530:
- Code at the bottom of the page: "Your move."
"You Won!" "It's a TIE!" ("It's" needs a single apostrophe
as well)
p. 540:
p. 549:
- Near the bottom of the page: //System.out.println("Value="+bestValue);
p. 550
- Bold text, middle of the page: lblMessage.setText("My move.");
- A few lines down: lblMessage.setText("I must pass.");
- Near the end: lblMessage.setText("Your move.");
p. 551:
- Top of the page: lblMessage.setText("Your move.");
p. 594:
- Top of the page: startDateLabel.setText("Start Date");
- The two lines following startDateLabel.setToolTipText( need a single
pair of quotes. For legibility, break into two strings on separate lines,
joined by "+": "Start date = start-of-day " + "Completion dates = end-of-day."
(Space beteen start-of-day and final quote)
p. 615:
- Badly wrapped line: listeners.elementAt(...) should be indented
p. 619:
- Code at the top: (! modifiers.equals("Alt"))
Case statements need single quotes:
case 'd':
case 't':
case 'r':
case 'n':
p. 622:
- Upper middle, under case DATECOLUMN: ....return "";
- Next line: ...return "";
p. 623:
- Code lines at the bottom:
putValue(Action.NAME, "Mark Done");
putValue(Action.SHORT_DESCRIPTION, "Mark a task as done.");
p. 625:
- Bold code in the middle: b.setText("");
p. 628:
- Bold code, upper middle: fileNew.setText("New");
p. 629:
- In Note at the top: getKeyStroke('d'). (single quotes around d)
p. 634:
- Lower middle: b.setText("");
p. 636:
- Bold code, lower middle: return new URL("file:" + filePath);
p. 637:
- Code in the middle of the page:
System.getProperty("user.dir");
System.getProperty("file.separator");
new URL("file:" + filePath);
p. 639:
- Middle: "The current project has changed."
- Next line: + "Do you want to save your changes?");
p. 649:
- Near the top: "Scheduler Project";
- The line below: "Version 1.0";
p. 652:
- Bottom: setText(""+t.getSpecDur());
p. 653:
- Near the top: setText(""+t.getSpecDur());
p. 656:
- Bold code near the top: "The text you entered...characters"));
p. 671:
- Middle of the page: case "state 1": ...
- The line below: case "state 2" ...
- Near the bottom: case s = "foo":
p. 734:
- Middle: imgPath = "file://" +userDir + fs + fileName;
p. 735:
- Lower middle: String fs = System.getProperty("file.separator");
- Line below: String userDir = System.getProperty("user.dir");
p. 737:
- Near the top: (msgMargin + "Error loading images");
Chapter 11: Getting More Out of JBuilder
Add the following paragraph to page 349:
When you are deploying an applet, you may need to ensure that the deployment
wizard picks up Swing "look and feel" classes, JBCL classes, and JGL classes
(depending on which classes the applet uses). Otherwise, the applet will work
fine in JBuilder but will not work when deployed. Those steps require uncommenting
the look and feel rendition-code in the static initializer and making sure
not to exclude the JBCL and JGL libaries in the deployment wizard if they
are needed. For complete directions, go to: http://we.got.net/~rwilkman/java/jbuilder/index.html
and select "Build and Deploy an Applet in JBuilder". (Thanks to Joseph Walsh
for this info.)
Chapter 16: Scheduling a Project
Add the following (step 2.5) to the list under Getting Started on page 565:
Create a new directory, c:\JBuilder2\myprojects\com (assuming that is where
JBuilder is installed). Then, using the CD that came with this book, copy
the contents of \projects\com to the new directory. This directory contains
two Swing "extension: classes for the com.sun.java.swing.tree package, DefaultTreeCellRenderer
and DefaultTreeCellEditor. Earlier versions of the Swing libraries do not
include these two classes, although later versions should.
Add the following to step three in the list under Getting Started on page
565:
The latest versions of the Swing libaries have migrated to the package /javax/swing.
If you download such a version, you will need to modify the Scheduler app
so that the import statements in each file have the proper path. (The Swing
download includes a utility to make that easier. It keeps in mind the fact
that while most Swing packages have migrated to /javax/swing, two of the "look
& feel" packages have remained behind in com/sun/java/swing. Those packages
are for the Motif look & feel and the Windows look & feel.)
Chapter 18: Looking Forward
Add the following to page 665, under "Database Access":
To get a CD-based multimedia tutorial on database programming with JBuilder,
go to http://www.referentia.com/products/rfj/rfjvol2.htm.
Appendix A: Troubleshooting Tips
Add the following to Program Runtime Errors on page 689:
"Can't run deployed applet"
If the applet runs fine in the development enviroment, but does not run
when packaged into a JAR file, you may need to uncomment the code that loads
the Swing look & feel classes in the static initializer. If the applet uses
classes in the JBCL or JGL libraries, you may also need to make sure that
they are not excluded by the deployment wizard. For more information, see
http://we.got.net/~rwilkman/java/jbuilder/index.html,
and select "Build and Deploy an Applet in JBuilder".
Appendix E: Additional Resources
Add the following to Java Software, Utilities, and APIs on page 744:
Item: Additional Swing-based components
URL: http://www.freeyellow.com/members6/pingsoft/kiwi.html
Description:
A library of additional components for the Swing tookit. Freely downloadable.
Includes a date chooser component.