Java Reference
In-Depth Information
3 Understanding Error Messages
Figure 3-53 displays a Command Results window with error messages. Using
what you know about coding and error messages, list the possible coding errors
that might cause TextPad to display the error messages.
FIGURE 3-53
4 Using the Java API
The Java API is a good tool to look up information about a class with which you
may be unfamiliar or to check the syntax of commands and methods you wish
to use in your programs. While connected to the Internet, start a browser, type
http://java.sun.com/j2se/5.0/docs/api/ in the Address text box and then
press the ENTER key to view the Java API Specification on the Sun Web site. The
Java API Specification is organized by the packages, hierarchically, but many
programmers click the Index link located at the top of the page to display the
entire list alphabetically.
With the Java API Specification open in the browser window, perform the
following steps.
1. Use the down scroll arrow in the upper-left frame to display the javax.swing
link. Click the javax.swing link.
2. When the javax.swing page is displayed in the lower-left frame, scroll down
to display the list of Classes. Click JOptionPane in the list of Classes.
3. When the Class JOptionPane page is displayed in the main frame, read the
opening paragraphs that describe the JOptionPane class (Figure 3-54). Read
three sections entitled Parameters, Examples, and Direct Use.
Search WWH ::




Custom Search