`
`
`
`I, Peter Kent, declare as follows:
`
`1.
`
`I am over the age of majority and make this declaration of my own
`
`personal knowledge.
`
`2.
`
`I am a co-author of the book entitled “Special Edition Using Netscape
`
`3,” by Mark R. Brown et al., published by Que Corporation in 1996.
`
`3.
`
`“Special Edition Using Netscape 3” was published within the United
`
`States in December, 1996.
`
`4.
`
`As a co-author I received a copy of the “Special Edition Using
`
`Netscape 3” book shortly after it was published in approximately December, 1996.
`
`5.
`
`The publisher of the book, Que Corporation, sent periodic updates to
`
`me beginning in 1996 concerning sales of “Special Edition Using Netscape 3”,
`
`confirming the public availability of the book.
`
`6.
`
`Attached hereto as Exhibit A is a true and correct copy of the cover,
`
`copyright page, and select excerpts of “Special Edition Using Netscape 3”which
`
`were included in the book when it was first published in 1996.
`
`7.
`
`I declare under penalty of perjury under the laws of the United States
`
`of America that this declaration is true, complete, and accurate to the best of my
`
`knowledge. I further acknowledge that willful false statements and the like are
`
`punishable by fine or imprisonment, or both (18 U.S.C. § 1001).
`
`
`
`
`
`0001
`
`Blue Coat Systems - Exhibit 1082
`
`
`
`Executed at Denver, Colorado on September 13, 2015.
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`______________________________
`
`Peter Kent
`
`
`
`
`
`
`
`
`
`
`
`
`
`0002
`
`
`
`Includes FREE ')
`Netscape
`Navigator'"
`Gold 3
`
`THEHPPALMTOPPAPER
`Thaddeus Computing, Inc.
`P.O. Box 869
`Fairfield, Iowa 52556
`(515) 472·6330
`
`0003
`
`
`
`Special Edition Using Netscape 3
`Copyright© 1996 by Que® Corporation.
`
`All rights reserved. Printed in the United States of America. No
`part of this book may be used or reproduced in any form or by any
`means, or stored in a database or retrieval system, without prior
`written permission of the publisher except in the case of brief quota(cid:173)
`tions embodied in critical articles and reviews. Making copies of
`any part of this book for any purpose other than your own personal
`use is a violation of United States copyright laws. For information,
`address Que Corporation, 201 W. 103rd Street, Indianapolis, IN
`46290. You may reach Que's direct sales line by calling 1-800-428-
`5331.
`
`Library of Congress Catalog No.: 96-68989
`
`ISBN: 0-7897-1180-x
`
`This book is sold as is, without warranty of any kind, either express
`or implied, respecting the contents of this book, including but not
`limited to implied warranties for the book's quality, performance,
`merchantability, or fitness for any particular purpose. Neither Que
`Corporation nor its dealers or distributors shall be liable to the
`purchaser or any other person or entity with respect to any liability,
`loss, or damage caused or alleged to have been caused directly or
`indirectly by this book.
`
`98 97 96
`
`6 5 4 3 2 1
`
`Interpretation of the printing code: the rightmost double-digit num(cid:173)
`ber is the year of the book's printing; the rightmost single-digit
`number, the number of the book's printing. For example, a printing
`code of 96-1 shows that the first printing of the book occurred in
`1996.
`
`All terms mentioned in this book that are known to be trademarks
`or service marks have been appropriately capitalized. Que cannot
`attest to the accuracy of this information. Use of a term in this book
`should not be regarded as affecting the validity of any trademark or
`service mark.
`
`Screen reproductions in this book were created using Collage Plus
`from Inner Media, Inc., Hollis, NH.
`
`0004
`
`
`
`CHAPTER 28
`
`Sun's Java and the
`Netscape Browser
`
`~ ,,-;:~;;~,,;;~J-ava is a new programming language created by Sun
`Microsystems, and has created a lot more excitement than
`new programming languages usually generate. Program(cid:173)
`mers are excited about Java because the language sup(cid:173)
`ports many useful features, such as an object-oriented
`structure, intuitive multithreading, and built-in network
`support. The language also avoids many of the pitfalls of
`C++. Where C++ forces the programmer to keep track of
`the memory that he uses, a Java programmer doesn't
`need to worry about using memory reserved for the
`system or not freeing up memory appropriately.
`
`Java programmers don't need to worry about how
`memory is utilized because of how a Java program is run.
`Java is a semi<ompiled language. When you program in a
`compiled language like C++, the compiler takes your
`source code and creates a file that is ready for the system
`to execute. A Java compiler doesn't work this way. In tead,
`it creates a file that contains bytecodes. This file is then
`handed to an interpreter that sits on your computer. That
`interpreter executes the program. The interpreter keeps
`track of how memory is used, and can let the programmer
`know if something has gone wrong. This is different from
`an errant C++ program, which simply stops, sometimes after
`crashing the system. Because of this, it is much harder to
`debug C++ programs than programs written in Java.
`
`http:/ jwww.mcp.comjque
`
`0005
`
`
`
`•• , •. _J--
`
`-
`
`- - --.
`656
`
`Chapter 28 Sun's Java and the Netscape Browser
`
`But these advantages aren't the only reasons that]ava is generating so much excitement. Its
`semi-compiled nature allows the language to be architecture neutral, which means that you can
`compile your Java program once and it is ready to run on many different platforms. But the
`real brilliance of Java is that it is designed with distributed systems in mind. Part of this is the
`built-in networking support. The more important part is that a Java program can be transferred
`across the Internet to your computer and the interpreter can make sure that it doesn't do any(cid:173)
`thing bad to the system.
`
`But you are probably asking, "Why does this interest me, a Netscape 3.0 user?" The reason
`that it should is that Netscape 3.0 has a Java interpreter built in, which means that instead of
`just downloading pictures, sound, and text, Netscape 3.0 can download small programs called
`applets, which are then run on your computer. These applets, which are written in Java, can
`display animations, allow you to play games, or get stock prices from a remote computer. What(cid:173)
`ever these applets do, you don't have to worry about them crashing your system, spreading a
`virus, or wiping out your hard drive.
`
`In this chapter, you learn
`
`• What a Java Appletis
`• How Java Applets are changing the Web
`• How Java works in N etscape
`• What people have been designing Java Applets to do
`• Where to find a wealth of online Java resources •
`
`Why Java Is Waking Up the Internet
`
`In the Spring of 1995, Sun Microsystems released a Web browser called Hot]ava. This Web
`browser was written in a new programming language called Java. This language was originally
`intended to handle such tasks as interactive television and coordination of household appli(cid:173)
`ances. The explosion of the Web in 1994 revealed the real opportunity for Java, and work on the
`Web browser commenced.
`
`Though this Web browser was rough around the edges, it could do some things no other Web
`browser at that time could. With this Web browser, a user could see animation, play games,
`and even view a ticker tape of their up-to-date stock prices. Almost immediately after its re(cid:173)
`lease, Netscape decided to license Hot]ava's technology and incorporate it into its browsers.
`Netscape's incorporation of this technology into Netscape 3.0 makes this technology available
`to a much wider audience than before. This wider audience, along with the capabilities that
`Java provides, is revolutionizing the Web.
`
`What Is a Java Applet?
`N etscape 3.0 can run Java Applets, which are small programs that are downloaded from a Web
`server. There isn't anything special about how it does this; it downloads a Java Applet in pre(cid:173)
`cisely the same manner as it downloads any file. Just as any browser displays an image as it is
`
`0006
`
`
`
`Why Java Is Waking Up the Internet
`
`657
`
`r-----~·.:
`
`received, a Java-capable browser runs the Java Applet. When the Java Applet runs, it is much
`(but not exactly) like any other program that can run on your computer. It can take input from
`your keyboard, mouse, or even a remote computer. The output displays on your screen.
`
`But there are differences between a Java Applet and the applications that sit on your desktop.
`You wouldn't want Netscape 3.0 to download a virus. At the same time, you wouldn't want to
`have to check every program that came down, because most programmers have no interest in
`harming your computer. Because of the way that the Java language is structured, you don't
`have to worry about a Java Applet harming your computer.
`
`But this does mean that there have been some restrictions placed on Java Applets. In fact, a
`Java Applet knows next to nothing about your computer. It can't look or write to any file in your
`file system. It can use your computer's memory, but not directly. These restrictions on a java
`Applet keep your computer safe from harm, and also protect your privacy.
`
`How a Java Applet Is Different from the CGI Program
`Anyone who has been around the Web for a while knows that programs can be run on the Web
`without]ava. One ofthe reasons the Web, without Java, has become so popular is that the Web
`allows simple interaction across the Internet. It does this through the Common Gateway Inter(cid:173)
`face (CGI). The CGI underlies electronic forms, imagemaps, and search engines. Basically, it
`runs a program that resides on the server. The program, called a CGI program, outputs a Web
`page, and that Web page is sent back to the client (see fig. 28.1).
`
`The Common Gateway Interface puts the Web a step above other information protocols such
`as FI'P and Gopher because it allows you to tell a remote computer to do things for you. It is
`great for information providers because they can let you do very specific tasks without having
`to give you, and the rest of the world, the run of their machines.
`
`CGI programs are great for a lot of things. For instance, let's say that you are an officer of a
`club that is running a Web server. Through the use of a simple CGI program, you can give
`your members a way to keep their mailing addresses up to date. You can put an electronic form
`on your Web site, and if someone moves, she can just access that form and enter her new ad(cid:173)
`dress. Then, the CGI program takes that information and updates the database.
`
`However, there are many limitations of CGI programs that applets overcome (see table 28.1).
`
`Table 28.1 Differences Between CGI Programs and Java Applets
`
`Property
`
`Get information from
`remote computer
`
`Computer that
`it runs on
`
`How it handles
`input and output
`
`Java Applet
`
`CGI Program
`
`Yes
`
`Client
`
`Yes
`
`Server
`
`Instantaneously
`across the Internet
`
`Only after
`transmission
`
`0007
`
`
`
`664
`
`Chapter 28 Sun's Java and the Netscape Browser
`
`How Java Works in Netscape 3.0
`
`Netscape 3.0 has the ability to run Java Applets. Because of how it is set up, a Java Applet
`knows next to nothing about your computer. This means that you don't have to worry about a
`Java Applet doing damage to your computer. But if you just want to see cool applets, you don't
`need to know anything about it. If this is all you want to do, just read the following section,
`"How to Access Java Applets with Netscape 3.0," and start exploring.
`
`N 0 T E Netscape 3.0 improved Java and JavaScript, adding security enhancements, support
`for Macintosh, Windows 3.1, IBM AIX and BSDI platforms, and support for additional
`languages, such as Chinese, Japanese, and Korean. With JavaScript, users can now change GIF and
`JPEG images on the fly as well as detect which plug-ins are loaded on a page.
`
`In addition, Netscape 3.0's new LiveConnect protocol allows Web developers to script, link, and control
`live objects such as plug-ins, Java applets, and HTML objects.
`
`How to Access Java Applets with Netscape 3.0
`There is nothing complicated about accessing applets with Netscape 3.0. After your browser is
`set up correctly, you don't need to configure anything to enable Java. To the user, an applet is
`simply a part of a Web page, just as an image or text can be. In the case that a page contains an
`image, the browser takes care of getting that image and displaying it. With a Java-enabled
`browser, the same is true with applets. When you access a Web page that has an applet embed(cid:173)
`ded in it, the browser fetches the code and takes care of running it.
`
`Running an applet is not hard. It takes no advanced planning or configuring. As long as your
`version of Netscape 3.0 is Java-enabled, you can just point your Web browser at a page that
`contains the applet you want. There is a list of Web sites at the end of this chapter that have
`Java Applet pages. As long as these Java pages don't tell you that your browser doesn't support
`Java, you are ready to start exploring the Java-ized Web.
`
`CAUTION
`Some Java Applets cannot be accessed by Netscape 3.0, even if your version supports Java Applet handling.
`This is because many Java Applets were written while Java was still being developed. Those Java Applets are
`not compatible with the current standard.
`
`How Netscape Runs Java Applets
`Now let's look at the technical issues involved in running an applet. When Netscape encounters
`an HTML page with an APPLET tag, it retrieves the compiled Java classes from the remote
`server in the same way that it retrieves any other object. After the applet has been downloaded
`across the network onto your machine, it is subjected to various security checks before it is
`actually loaded and run. These checks are performed by the Java verifier. After the code is
`checked, it is loaded into its own place in the Netscape's applet runtime environment. This is
`
`0008
`
`
`
`How Java Works in Netscape 3.0
`
`665
`
`done by the Java class loader. This loading is done in such a way that an applet is kept separate
`from system resources and other applets.
`
`N o T E
`
`In object-oriented languages, classes are the definitions of objects. When a programmer is
`writing his program, he writes a class. When the program is run, the computer takes that
`definition and creates an object.
`
`Because Java code is platform independent, it must be interpreted, or translated, into instruc(cid:173)
`tions that your machine can understand. This translation is performed by the Java interpreter.
`The Java interpreter can be thought of as a special viewer application that allows Netscape 3.0
`to run applets inline.
`
`This whole process disallows the applet from harming your computer in any way. This is ex(cid:173)
`plained further in the next section on Java and safety, "Why Java Applets Won't Harm Your
`Computer."
`
`Why Java Applets Won't Harm Your Computer
`The idea of your machine executing code fragments downloaded from a public network most
`likely makes your stomach a bit uneasy. People often ask if a Java Applet could erase their files
`or propagate a virus into their computer. Luckily, safe execution was a major consideration
`from the very start of making Java.
`
`The Java language, and the technology Netscape 3.0 uses to run applets, provides many de(cid:173)
`fenses against malicious applets. These strict language security mechanisms, coupled with
`Netscape 3.0's watchful eye, create an environment in which code can be run on your machine
`with virtually no chance of it accessing your private data or starting a virus.
`
`The Java Console Window
`Many programmers write their applets so that they print out messages while they are execut(cid:173)
`ing. Usually, this information helps the programmer see whether or not an applet is encounter(cid:173)
`ing problems. In Netscape 3.0, the Java Console window provides a way for you to view the
`direct output of an applet as it is running. Just select Show Java Console Window from the
`Qptions menu. The Java Console window pops up as shown in figure 28.6.
`
`Later, if you write your own applets, this window is your way of keeping tabs on your applet
`during the development process. If you need to, you can copy from this window and paste in
`another document.
`
`The Four Layers of Defense
`Java contains multiple layers of security, each serving to filter out harmful code. This section
`will provide you with a firm understanding of how Java's security layers serve to protect your
`machine. At the same time, this section will give you the security background necessary to
`program your own applets.
`
`0009
`
`
`
`666
`
`Chapter 28 Sun's Java and the Netscape Browser
`
`FIG. 28.6
`The Java Console
`window.
`
`.!1
`
`The four layers of security built into Java and Netscape are as follows:
`
`• The Java language and compiler
`• Java bytecode verification and strong type information
`• Java's class loader
`• Restrictions on local file system and network access
`
`Safety Layer One-The Java Language's Defenses The first layer of safety in the Java lan(cid:173)
`guage comes from its lack of the harmful language and compiler features that C and C++ both
`possess. Java does not allow the programmer to directly manipulate memory. C and C++, how(cid:173)
`ever, do allow direct manipulation of memory, which means that a careless programmer can
`manipulate memory that the system has reversed for its use. This is the usual cause for a sys(cid:173)
`tem crash. A malicious programmer can also use this weakness to propagate a virus.
`
`Let's focus on how the Java Applet interacts with Netscape 3.0 after it is downloaded. The fun(cid:173)
`damental line of defense is that Netscape 3.0 keeps the Java Applet from dealing with a specific
`memory address on your computer. Of course, a Java Applet does use your computer's
`memory. It is just that Netscape 3.0 won't let an applet look at or write to a specific memory
`address. If the applet needs to change something in that data, it hands its changes back to
`Netscape 3.0 (see fig. 28.7). Netscape 3.0 actually changes the data in memory.
`
`Unlike C and C++, the structure of the Java language requires this interpreter. With a C or C++
`program, the programmer might not be malicious or careless and maybe he used an advanced
`compiler that won't produce evil programs. You don't have to hope that a Java program won't
`harm your computer; the interpreter simply won't allow it. Because a Java program must ac(cid:173)
`cess memory through the interpreter, that interpreter is in complete control. Netscape 3.0 acts
`as a firewall between a Java Applet and your computer. It does this by isolating the program
`from the rest of the system and acting as its guardian. By forcing a Java program to obey its
`guardian, the Java language itself keeps the program from misbehaving and harming your
`system.
`
`Besides direct memory manipulation, the Java language also deals very carefully with casting.
`Casting allows a programmer to change one data type to another, even if this shouldn't be
`done. In C++, a programmer is able to cast a complex object to a much simpler type, like an
`array of bytes. Generally, doing this is an error and causes the program to crash. However, a
`malicious programmer can use this to change the object itself. He can overwrite the individual
`bytes that make up the object so that it does something that the language doesn't allow. The
`Java language only allows the programmer to cast between types when it makes sense to cast.
`
`0010
`
`
`
`How Java Works in Netscape 3.0
`
`667
`
`It checks all attempts to cast very carefully, while C and C++ allow the programmer to cast
`between literally any two data types. Java's strong checking of casting closes the back door on
`the type of memory manipulation described earlier.
`
`These are the ways that the Java language itself assures a certain degree of safety for all Java
`programs. But these features aren't enough to prevent an applet from harming your computer.
`This layer is just the foundation for the other layers of safety in the Java environment. You will
`now see why this layer means very little without the support of the following layers.
`
`Safety Layer Two-Making Sure the Applet Isn't Faking It After a Java, C, or C++ program is
`written, the author compiles it. For C and C++, the compilation process produces an executable
`file. This file can be loaded into your computer's memory and run. Most programs on your
`desktop have been created through this process.
`
`FIG. 28.7
`How a Java Applet
`accesses memory.
`
`Jaua Rpplets
`
`Memory
`
`Java is a semi-compiled language, and its compilation process is different. When Java is com(cid:173)
`piled, the compiler produces platform-independent machine instructions called bytecodes.
`These bytecodes are what Netscape retrieves from a remote server, and then executes on your
`machine (see fig. 28.8). Because a compiler can easily be altered to bypass the first level of
`security, these bytecodes must be subjected to strong tests before being executed on your
`machine.
`
`The second layer of safety accomplishes this. When Netscape 3.0 downloads an applet, the
`bytecode of that applet is examined by your browser's verifier. The verifier subjects each code
`fragment to a sequence of tests before it is allowed to execute. It first looks to see that the
`bytecode has all of the information about the different data types that are going to be used.
`There is actually more of this type of information than strictly necessary. This excess of infor(cid:173)
`mation helps the verifier analyze the rest of the bytecode.
`
`It is possible for a malicious programmer to write a Java compiler that doesn't follow all the
`rules of the Java language. He could write it so that it produces. code that tricks the compiler
`into harming your computer. The verifier ensures that no such code ever reaches the inter(cid:173)
`preter. It checks to make sure that the bytecode plays by the rules of the Java language, and
`protects the integrity of the interpreter.
`
`0011
`
`
`
`668
`
`Chapter 28 Sun's Java and the Netscape Browser
`
`N 0 T E An example of an alternative Java compiler is Borland's C++ Development Suite, version
`5.0. While it is by no means "malicious" in any way, it will compile Java bytecode all by
`itself, but it is still checked by the verifier for security. For more information, check out http:/ 1
`www.borland.com.
`
`Safety Layer Three-Keeping an Applet Separate The class loader offers Java's third line of
`defense. As independent pieces of code are loaded and executed, the class loader makes sure
`that different applets can't interfere with each other. It also means that each and every applet
`is completely separate from the Java objects already resident that it needs to actually run. This
`means that an applet can't go and replace parts of Netscape 3.0 needed to run applets.
`
`FIG. 28.8
`How Java Applets run.
`
`Code
`
`compiler
`
`Java
`~ode a
`
`If it could replace these parts, all layers of safety could be undermined. All applets depend on
`the interpreter to provide it with some of the basic constructs of the Java language. If the
`applets aren't kept strictly separate, an applet can override some of these basic constructs. By
`overriding these basic constructs, the applet can violate the integrity of the Java language itself,
`and trick the interpreter into hurting your system.
`
`Netscape 3.0 Includes Borland's Java JIT Compiler
`Netscape enhanced its Java support when they struck a deal with Borland International Inc. to
`include the Borland JIT compiler, APPAcce/erator, for Windows 95.
`
`0012
`
`
`
`Including Java Applets in Web Pages-The APPLET Tag
`
`669
`
`Although the Java programming language produces dynamic live Web pages, users and developers
`have complained of its slow compile time. AppAcce/erator translates Java bytecodes into machine
`code (Intel in this case) allowing programs to execute 5-10 times faster. The JIT compiler will entice
`more developers to create Java programs and, given its fast compile time, will enable users to quickly
`use Java applets without further time delays.
`
`Safety layer Four-Protecting Your File System The fourth level of defense against harmful
`applets comes in the form of file system access protection. Applets are restricted from any
`access to the local file system, so they can neither read your files, overwrite your existing files,
`nor generate new ones. This not only protects your privacy, but also prevents your files from
`being corrupted or infected by viruses.
`
`The interpreter protects your computer's safety by simply disallowing all Java language calls
`that deal with files. The Java language itself, being equivalent to C++, does have the ability to
`deal with a file system. But the interpreter in Netscape 3.0 won't allow applets to have that
`capability. If an applet tries to open a file, the interpreter just tells the applet that the file system
`does not exist.
`
`N o T E The Java language ensures that a Java program can only affect your system in safe ways.
`Even if someone troubled himself to write a fake Java compiler, the verifier in Netscape 3.0
`would figure it out and refuse to run the applet. The class loader makes sure that applets are kept
`separate from your system and other applets. To top it all off, the interpreter doesn't even allow an
`applet to access the file system. This means that an applet only knows about the Netscape 3.0 applet
`runtime environment, and c(!n't access any part of your computer beyond that. t·;
`
`Including Java Applets in Web Pages-The APPLET Tag
`Including an applet in a Web document is accomplished via an extension to HTML called the
`APPLET tag. This tag, along with the PARAM tag, allows the Web page designer to include and
`configure executable content in documents. The general syntax for including an applet in a
`Web page is as follows:
`
`<APPLET CODEBASE=codebaseURL CODE=appletFile.class WIDTH=pixels HEIGHT=pixels>
`<PARAM NAME=someAttributeName VALUE=1st_attributeValue>
`<PARAM NAME=someOtherAttributeName VALUE=Nth_attributeValue>
`{Alternate HTML displayed by non-java enabled browsers}
`</APPLET>
`
`The following are the definitions of the various tags:
`
`• APPLET -Signifies that an applet is to be included in the document.
`• CODE BASE-The path, to the classes directory containing the Java code. If this field is
`omitted, then the CODEBASE is assumed to be the same as the document's URL.
`• CODE-The name of the applet to be included in your page. This file always ends in .class,
`which indicates that it is a compiled Java class. It should be noted that this variable is
`relative to the applet's base URL and should not be given as absolute.
`
`Oh
`
`0013
`
`
`
`670
`
`Chapter 28 Sun's Java and the Netscape Browser
`
`• HEIGHT and WIDTH-The dimensions in units of pixels that the applet takes up on your
`Web page.
`
`• PARAM-Used to pass a parameter to an applet.
`• NAME-The name of the parameter. This name must be understood by the applet.
`• VALUE-The value that corresponds to a given name. This is where you may enter your
`configurations.
`
`As shown above, alternative HTML can be included between the open and close APPLET tags.
`This code is intended to be displayed if the person who accesses your page is not using a Java(cid:173)
`enabled browser, such as Netscape 3.0. If Netscape 3.0 can't download the Java Applet, it shows
`the alternative HTML.
`
`If the browser can run the Java Applet, then the alternative text is not shown. This feature
`comes in very handy when designing pages for an audience mixed between Java-enabled and
`non-Java-enabled browsers.
`
`When including applets in your Web pages, use alternative HTML inside the APPLET tag as a courtesy
`to people whose browsers are not Java-enabled.
`
`The PARAM tag makes it possible for Web page designers to configure an applet to their special
`needs. This feature allows applets to be written as generalized tools that can be configured to
`work in many different situations. Someone who has no desire to learn all of the details of
`programming applets can customize other people's Java Applets to fit his own needs. For ex(cid:173)
`ample, a simple animation applet can be told which sequence of images it should load and
`display. Because such an applet can be configured, many people can run different animations
`using the same code. You can imagine that without the PARAM tag, using Java would become
`much more difficult for designers. If applets were not configurable, in the case of the animation
`applet, individual designers would each have to customize their own copy of the program.
`
`Let's look now at a simple example that shows how to include a configurable applet in a Web
`page. For simplicity, we will use the Blinking Text example from the Java Product Development
`Team. This applet displays a text string in multiple colors and then blinks each word at ran(cid:173)
`dom. It takes two parameters; lbl is the text string that is displayed and speed is the rate at
`which the text blinks.
`
`To include this applet in one of your Web pages, add this code:
`
`<HR>
`<APPLET
`CODEBASE="http://www.javasoft.com/JDK-prebeta1/applets/Blink/"
`CODE="Blink.class" WIDTH=300 HEIGHT=130>
`<PARAM NAME=lbl VALUE="Configuring Applets is easy and very useful.
`with Netscape 3.0, we can make an applet do what WE WANT!">
`<PARAM NAME=speed VALUE="4">
`Sorry, you should be using Netscape 3.0. <BR>
`Your browser is not Java enabled!! !I
`<=/APPLET>
`<HR>
`
`0014
`
`
`
`Examples of Java Applets on the Internet
`
`.------- --
`671
`
`--1'1
`
`Figure 28.9 shows what you should see when you load your page, if you are using
`Netscape 3.0.
`
`FIG. 28.9
`Results of configura(cid:173)
`tion.
`
`~lt'lliJ./- 01. __ ..,.
`l\'!'o6 ~ ... I \lll>ot•t.d I K - I IJF' lull I N•III•.O.tl
`
`Example: The Blinking Text Applet
`
`t ppl
`u ~ful \\ 1Ut
`we 1.'1Ul lll<lk(· llf1
`apple.t what
`'ANI"!
`
`In this example, the Blinking Text Applet is loaded from a remote site (http:/ I
`www.javasoft.com, in this case). This shows that you are not obligated to download the applet
`onto your own machine just to include it on a Web page. As always, when including someone
`else's work in your pages, you should make sure you have the permission of the author first.
`
`N 0 T E
`
`It is impossible to describe, generally, how Java Applets should be configured. It is totally
`up to the author of a Java Applet to decide how the applet may be configured and to
`provide documentation for th~applet user. II
`
`Examples of Java Applets on the Internet
`
`In the short time that Java has been alive, the World Wide Web has come to life with clever
`Java programs. Here are a few examples that show the kind of stuff that Java can do for the
`Web. Be sure to point Netscape 3.0 at the URLs to see them in action.
`
`Entertainment and Games on the Web
`Because so much of the Web is designed to entertain, it isn't surprising that people have been
`writing applets to further the cause. Many applets are designed to spice up Web pages. Prob(cid:173)
`ably the most common example is the use of applets to embed animation into a Web page.
`
`Many applets let us play games over the Web. For example, applets for mine sweeper and tic(cid:173)
`tac-toe have been written. The applet shown in figure 28.10 lets you fill in a crossword puzzle. It
`has a couple of advantages over the crossword puzzle in your daily newspaper. First, you don't
`have to strain to find the clue; you just click the mouse in the box. The clue appears at the top.
`Second, it gives you feedback. Incorrect responses are displayed in red, while correct ones are
`shown in black.
`
`Crossword purists may not consider these improvements, but it is a good example of how
`applets add inter~ctivity to the Web.
`
`0015