Você está na página 1de 18

What Is an Object?

Objects are key to understanding object-oriented technology. Look around right now and
you'll find many examples of real-world objects: your dog, your desk, your television set,
your bicycle.

Real-world objects share two characteristics: They all have state and behavior. Dogs
have state (name, color, breed, hungry) and behavior (barking, fetching, wagging tail).
Bicycles also have state (current gear, current pedal cadence, current speed) and behavior
(changing gear, changing pedal cadence, applying brakes). Identifying the state and
behavior for real-world objects is a great way to begin thinking in terms of object-
oriented programming.

Take a minute right now to observe the real-world objects that are in your immediate
area. For each object that you see, ask yourself two questions: "What possible states can
this object be in?" and "What possible behavior can this object perform?". Make sure to
write down your observations. As you do, you'll notice that real-world objects vary in
complexity; your desktop lamp may have only two possible states (on and off) and two
possible behaviors (turn on, turn off), but your desktop radio might have additional states
(on, off, current volume, current station) and behavior (turn on, turn off, increase volume,
decrease volume, seek, scan, and tune). You may also notice that some objects, in turn,
will also contain other objects. These real-world observations all translate into the world
of object-oriented programming.

A software object.

Software objects are conceptually similar to real-world objects: they too consist of state
and related behavior. An object stores its state in fields (variables in some programming
languages) and exposes its behavior through methods (functions in some programming
languages). Methods operate on an object's internal state and serve as the primary
mechanism for object-to-object communication. Hiding internal state and requiring all
interaction to be performed through an object's methods is known as data encapsulation
— a fundamental principle of object-oriented programming.

Consider a bicycle, for example:

A bicycle modeled as a software object.

By attributing state (current speed, current pedal cadence, and current gear) and providing
methods for changing that state, the object remains in control of how the outside world is
allowed to use it. For example, if the bicycle only has 6 gears, a method to change gears
could reject any value that is less than 1 or greater than 6.

Bundling code into individual software objects provides a number of benefits, including:

1. Modularity: The source code for an object can be written and maintained
independently of the source code for other objects. Once created, an object can be
easily passed around inside the system.
2. Information-hiding: By interacting only with an object's methods, the details of its
internal implementation remain hidden from the outside world.
3. Code re-use: If an object already exists (perhaps written by another software
developer), you can use that object in your program. This allows specialists to
implement/test/debug complex, task-specific objects, which you can then trust to
run in your own code.
4. Pluggability and debugging ease: If a particular object turns out to be problematic,
you can simply remove it from your application and plug in a different object as
its replacement. This is analogous to fixing mechanical problems in the real
world. If a bolt breaks, you replace it, not the entire machine.
What Is a Class?
In the real world, you'll often find many individual objects all of the same kind. There
may be thousands of other bicycles in existence, all of the same make and model. Each
bicycle was built from the same set of blueprints and therefore contains the same
components. In object-oriented terms, we say that your bicycle is an instance of the class
of objects known as bicycles. A class is the blueprint from which individual objects are
created.

The following Bicycle class is one possible implementation of a bicycle:

class Bicycle {

int cadence = 0;
int speed = 0;
int gear = 1;

void changeCadence(int newValue) {


cadence = newValue;
}

void changeGear(int newValue) {


gear = newValue;
}

void speedUp(int increment) {


speed = speed + increment;
}

void applyBrakes(int decrement) {


speed = speed - decrement;
}

void printStates() {
System.out.println("cadence:"+cadence+" speed:"+speed+"
gear:"+gear);
}
}
The syntax of the Java programming language will look new to you, but the design of this
class is based on the previous discussion of bicycle objects. The fields cadence, speed,
and gear represent the object's state, and the methods (changeCadence, changeGear,
speedUp etc.) define its interaction with the outside world.

You may have noticed that the Bicycle class does not contain a main method. That's
because it's not a complete application; it's just the blueprint for bicycles that might be
used in an application. The responsibility of creating and using new Bicycle objects
belongs to some other class in your application.

Here's a BicycleDemo class that creates two separate Bicycle objects and invokes their
methods:

class BicycleDemo {
public static void main(String[] args) {

// Create two different Bicycle objects


Bicycle bike1 = new Bicycle();
Bicycle bike2 = new Bicycle();

// Invoke methods on those objects


bike1.changeCadence(50);
bike1.speedUp(10);
bike1.changeGear(2);
bike1.printStates();

bike2.changeCadence(50);
bike2.speedUp(10);
bike2.changeGear(2);
bike2.changeCadence(40);
bike2.speedUp(10);
bike2.changeGear(3);
bike2.printStates();
}
}

The output of this test prints the ending pedal cadence, speed, and gear for the two
bicycles:
cadence:50 speed:10 gear:2
cadence:40 speed:20 gear:3

What Is Inheritance?
Different kinds of objects often have a certain amount in common with each other.
Mountain bikes, road bikes, and tandem bikes, for example, all share the characteristics
of bicycles (current speed, current pedal cadence, current gear). Yet each also defines
additional features that make them different: tandem bicycles have two seats and two sets
of handlebars; road bikes have drop handlebars; some mountain bikes have an additional
chain ring, giving them a lower gear ratio.

Object-oriented programming allows classes to inherit commonly used state and behavior
from other classes. In this example, Bicycle now becomes the superclass of
MountainBike, RoadBike, and TandemBike. In the Java programming language, each
class is allowed to have one direct superclass, and each superclass has the potential for an
unlimited number of subclasses:

A hierarchy of bicycle classes.

The syntax for creating a subclass is simple. At the beginning of your class declaration,
use the extends keyword, followed by the name of the class to inherit from:

class MountainBike extends Bicycle {

// new fields and methods defining a mountain bike would go here

}
This gives MountainBike all the same fields and methods as Bicycle, yet allows its code
to focus exclusively on the features that make it unique. This makes code for your
subclasses easy to read. However, you must take care to properly document the state and
behavior that each superclass defines, since that code will not appear in the source file of
each subclass.

What Is an Interface?
As you've already learned, objects define their interaction with the outside world through
the methods that they expose. Methods form the object's interface with the outside world;
the buttons on the front of your television set, for example, are the interface between you
and the electrical wiring on the other side of its plastic casing. You press the "power"
button to turn the television on and off.

In its most common form, an interface is a group of related methods with empty bodies.
A bicycle's behavior, if specified as an interface, might appear as follows:

interface Bicycle {

void changeCadence(int newValue); // wheel revolutions per


minute

void changeGear(int newValue);

void speedUp(int increment);

void applyBrakes(int decrement);


}
To implement this interface, the name of your class would change (to a particular brand
of bicycle, for example, such as ACMEBicycle), and you'd use the implements keyword
in the class declaration:
class ACMEBicycle implements Bicycle {

// remainder of this class implemented as before

}
Implementing an interface allows a class to become more formal about the behavior it
promises to provide. Interfaces form a contract between the class and the outside world,
and this contract is enforced at build time by the compiler. If your class claims to
implement an interface, all methods defined by that interface must appear in its source
code before the class will successfully compile.
Note: To actually compile the ACMEBicycle class, you'll need to add the public
keyword to the beginning of the implemented interface methods. You'll learn the reasons
for this later in the lessons on Classes and Objects and Interfaces and Inheritance.

What Is a Package?
A package is a namespace that organizes a set of related classes and interfaces.
Conceptually you can think of packages as being similar to different folders on your
computer. You might keep HTML pages in one folder, images in another, and scripts or
applications in yet another. Because software written in the Java programming language
can be composed of hundreds or thousands of individual classes, it makes sense to keep
things organized by placing related classes and interfaces into packages.

The Java platform provides an enormous class library (a set of packages) suitable for use
in your own applications. This library is known as the "Application Programming
Interface", or "API" for short. Its packages represent the tasks most commonly associated
with general-purpose programming. For example, a String object contains state and
behavior for character strings; a File object allows a programmer to easily create, delete,
inspect, compare, or modify a file on the filesystem; a Socket object allows for the
creation and use of network sockets; various GUI objects control buttons and checkboxes
and anything else related to graphical user interfaces. There are literally thousands of
classes to choose from. This allows you, the programmer, to focus on the design of your
particular application, rather than the infrastructure required to make it work.

The Java Platform API Specification contains the complete listing for all packages,
interfaces, classes, fields, and methods supplied by the Java Platform 6, Standard Edition.
Load the page in your browser and bookmark it. As a programmer, it will become your
single most important piece of reference documentation.

Life cycle of an Applet’

Introduction

In this Section you will learn about the lifecycle of an applet and different methods of an
applet. Applet runs in the browser and its lifecycle method are called by JVM when it is
loaded and destroyed. Here are the lifecycle methods of an Applet:

init(): This method is called to initialized an applet

start(): This method is called after the initialization of the applet.

stop(): This method can be called multiple times in the life cycle of an Applet.

destroy(): This method is called only once in the life cycle of the applet when applet
is destroyed.

init () method: The life cycle of an applet is begin on that time when the applet is first
loaded into the browser and called the init() method. The init() method is called only one
time in the life cycle on an applet. The init() method is basically called to read the
PARAM tag in the html file. The init () method retrieve the passed parameter through the
PARAM tag of html file using get Parameter() method All the initialization such as
initialization of variables and the objects like image, sound file are loaded in the init ()
method .After the initialization of the init() method user can interact with the Applet and
mostly applet contains the init() method.

Start () method: The start method of an applet is called after the initialization method
init(). This method may be called multiples time when the Applet needs to be started or
restarted. For Example if the user wants to return to the Applet, in this situation the start
Method() of an Applet will be called by the web browser and the user will be back on the
applet. In the start method user can interact within the applet.

Stop () method: The stop() method can be called multiple times in the life cycle of
applet like the start () method. Or should be called at least one time. There is only miner
difference between the start() method and stop () method. For example the stop() method
is called by the web browser on that time When the user leaves one applet to go another
applet and the start() method is called on that time when the user wants to go back into
the first program or Applet.

destroy() method: The destroy() method is called only one time in the life cycle of
Applet like init() method. This method is called only on that time when the browser needs
to Shut down.

http://staff.science.uva.nl/~heck/Courses/JAVAcourse/ch6/s1.html

http://www.hostitwise.com/java/japplet.html

Related Links by Google


Java Sun, Sun Java Tutorials, Java Tutorials - Java Example C...
Java Project Outsourcing, Java Outsourcing Projects, Oursourc...
Hire Java Developer, Hire Java Programmer
Java Tutorials, Java Code, Java Code Example, Find Java Tutor...
Core Java Interview Question, Interview Question
Java Tutorial
Related Searches by Google
java
java download
java update
life cycle

Re: types of applets?. Answer


#1
there are two types of applets are there.
1.local applets:these applets are run within the
browser.
2.remote applets:these appltes are run on the
internet.

Is This Answer Correct ? 44 Yes 3 No


0
Ravichandra
Re: types of applets?. Answer
#2
1.local applets:these applets are run within the
browser.

2.remote applets:these appltes are run on the


internet.

Is This Answer Correct ? 31 Yes 7 No


0
Dipil T T

Re: types of applets?. Answer


#3
Remember "Every APPLET act as a Browser"
and File extension os applet is .HTML
as question held types of applet it is simple.
1.LOCAL APPLET
2.REMOTE APPLET
Difference is that local applet operate in single
machine
browser which is not connected in network,while
remote
applet poerate over internet via network.

Is This Answer Correct ? 17 Yes 2 No


0
Shridhar Shelake
Re: types of applets?. Answer
#4
1.LOCAL APPLET
2.REMOTE APPLET
Difference is that local applet operate in single
machine
browser which is not connected in network,while
remote
applet poerate over internet via network.

Is This Answer Correct ? 10 Yes 1 No


0
Pramod Kumar
Re: types of applets?. Answer
#5
there are two types of applet
1>signed or trusted applet
2>unsigned or untrusted applet

Is This Answer Correct ? 3 Yes 9 No


0
Rakesh
Re: types of applets?. Answer
#6
APPLETS ARE 2 TYPES ,THEY ARE
1)LOCAL APPLETS
2)REMOTE APPLETS

Passing Parameters to Applets


Parameters are passed to applets in NAME=VALUE pairs in <PARAM> tags between the
opening and closing APPLET tags. Inside the applet, you read the values passed through
the PARAM tags with the getParameter() method of the java.applet.Applet class.

The program below demonstrates this with a generic string drawing applet. The applet
parameter "Message" is the string to be drawn.

import java.applet.*;
import java.awt.*;

public class DrawStringApplet extends Applet {

private String defaultMessage = "Hello!";

public void paint(Graphics g) {

String inputFromPage = this.getParameter("Message");


if (inputFromPage == null) inputFromPage = defaultMessage;
g.drawString(inputFromPage, 50, 25);
}

You also need an HTML file that references your applet. The following simple HTML
file will do:

<HTML>
<HEAD>
<TITLE> Draw String </TITLE>
</HEAD>

<BODY>
This is the applet:<P>
<APPLET code="DrawStringApplet" width="300" height="50">
<PARAM name="Message" value="Howdy, there!">
This page will be very boring if your
browser doesn't understand Java.
</APPLET>
</BODY>
</HTML>

Of course you are free to change "Howdy, there!" to a "message" of your choice. You
only need to change the HTML, not the Java source code. PARAMs let you customize
applets without changing or recompiling the code.

This applet is very similar to the HelloWorldApplet. However rather than hardcoding the
message to be printed it's read into the variable inputFromPage from a PARAM element in
the HTML.

You pass getParameter() a string that names the parameter you want. This string
should match the name of a PARAM element in the HTML page. getParameter() returns
the value of the parameter. All values are passed as strings. If you want to get another
type like an integer, then you'll need to pass it as a string and convert it to the type you
really want.

The PARAM element is also straightforward. It occurs between <APPLET> and </APPLET>.
It has two attributes of its own, NAME and VALUE. NAME identifies which PARAM this is.
VALUE is the string value of the PARAM. Both should be enclosed in double quote marks if
they contain white space.

An applet is not limited to one PARAM. You can pass as many named PARAMs to an
applet as you like. An applet does not necessarily need to use all the PARAMs that are in
the HTML. Additional PARAMs can be safely ignored.
Create a Java Applet
Those of you who purchased my latest book, Learn to Program with Java,
know that in the book, we
create a Java program designed to calculate grades for the English, Math and
Science departments of
a university. At the completion of the book, we have a working Java program
that uses a windows
Interface to prompt for grade components, and then displays the results. In
this article, I'm going to
show you how to take the project and modify it so that it can be displayed in a
web page. I think you'll
find the process amazingly painless.
What's an Applet?
An applet is just a Java class that runs in a Web Browser such as Internet
Explorer or Netscape.
Creating an Applet is really easy, unfortunately, there's one problem. Neither
Internet Explorer or
Netscape support the latest and greatest from Java--namely its Swing
Package, so if you intend to use
Swing components in your Applet we need to do a little more work. But let's
start with a simple Applet
so that you can see what's going on.
Let's write a simple applet from Scratch
Here's the code for our first Applet which will display 'I love Java' as a
message in a Web page
import java.awt.*;
import java.applet.*;
public class Example14_1 extends Applet {
public void paint(Graphics g) {
g.drawString("I love Java",20,20);
}
}
Let's take a closer look at the code and then we'll compile it and discuss how
to 'run' it in a Web page.
The first thing to note are the two import statements. We need to import 'awt'
in order to produce the
window within our browser. The second import statement is necessary
because all Applets extend, or
inherit from, the Java applet class.
import java.awt.*;
import java.applet.*;
Because of that, the line of code defining the Applet class must use the
keyword 'extends' as this one
does here…
public class Example14_1 extends Applet {
http://www.johnsmiley.com/cis18.notfree/Smiley031/Smiley031.htm (1 of 11)3/28/2004 12:16:57 PM
Create a Java Applet
The second thing to note is that Java Applets, unlike the Java Applications we
followed in the book,
may not have a main() method. A Java Applet, when it fires up in a Web
Browser, automatically looks
to execute three methods in this order.
l init()

l start()

l paint

You can choose which of these to code. The init() method is executed when
an Applet object is first
instantiated. The start() method is executed after the init() method completes
execution and every time
the user of the browser returns to the HTML page on which the applet
resides. The paint() method is
called after the init method has completed and after the start() method has
begun--most importantly,
code in the paint() method is guaranteed to run each time the window needs
to be re-drawn (i.e. after
the browser has been minimized, covered, the HTML page has changed, etc).
For our purposes, we coded the paint method, which uses a Graphics object
(here defined as 'g')to do
the drawing…
public void paint(Graphics g) {
The code in the paint() method is used to draw the window that will be
displayed in the Web Browser.
To do that we use the drawString() method of the Graphics object, supplying
the text that we wish to
appear in the window and it's dimensions…
g.drawString("I love Java",20,20);
We need to write some HTML
As I mentioned, Applet classes need to run within a Web Browser. Assuming
you have now compiled
the Java source file into a Bytecode file, we now need to create an HTML
document which will create
an instance of our Applet class when displayed in a Web Browser. (I don't
intend to teach you HTML in
this article--there are plenty of books and resources to do that.). Here's the
HTML necessary to create
an instance of our object and display its output in a Web Browser. I've saved
the HTML as
Example14_1.html
http://www.johnsmiley.com/cis18.notfree/Smiley031/Smiley031.htm (2 of 11)3/28/2004 12:16:57 PM
Create a Java Applet
The HTML file contains two lines of code that will, in a bare-bones way, do the
trick. HTML works
primarily with tags, and the code that you see is an Applet tag to tell the
Browser reading the HTML to
create an instance of the Example14_1 class, within a window 200 pixels
wide and 60 pixel high.
We're now ready to load our Applet into a browser, but before we do that, I
want to tell you about the
Applet Viewer.
Use the Applet Viewer to test our Applet
Java includes, in its Java Developers Kit, a special interpreter called the
Applet Viewer which can be
used to test the Applets we write. To execute it, open up a Command Window
and enter the following
instructions to execute the HTML file we just wrote.
http://www.johnsmiley.com/cis18.notfree/Smiley031/Smiley031.htm (3 of 11)3/28/2004 12:16:57 PM
Create a Java Applet
If we now press the ENTER key, we should see the Applet Viewer display
window, and within it, the
results of the execution of our Java applet…
The Applet Viewer can be shut down simply by clicking on its close button or
Control Menu Icon.
Display our Applet in a Web Browser
To test our Applet in a Web Browser, we need to be sure that our Web
Browser supports Java. Both
Internet Explorer and Netscape have settings to turn Java 'on'---if you have
doubts as to how to do
that, check your Browser's help file.
Assuming that your Browser has Java turned 'on', load up the HTML file we
created into the Browser.
Both Internet Explorer and Netscape permit you to display local HTML pages
by selecting File-Open
from the Menu Bar and selecting the HTML page. I'll do that here with Internet
Explorer (just to show
you that Microsoft has nothing against running a Java program!)
http://www.johnsmiley.com/cis18.notfree/Smiley031/Smiley031.htm (4 of 11)3/28/2004 12:16:57 PM
Create a Java Applet
Here's our Applet running in Internet Explorer…
As you can see, the results are basically the same as those we found when
running within the Applet
Viewer---the difference is that the Web Browser is now acting as the container
for our object, not the
Applet Viewer.
Now it's time to turn our attention to the Grades Calculation Project from my
Java book.
Convert the Grades Calculation Project into an Applet
Let's take a look at the code we have right now in the Grades Calculation
project. As you may recall,
the final Grades project from the end of the book consists of a number of
class modules.
l CalculateButtonListener

l DisplayGrade

l DrawGUI

l EnglishStudent

l GradesGUI

l MathStudent

l RadioButtonListener

l ResetButtonListener

l ScienceStudent

l Student
http://www.johnsmiley.com/cis18.notfree/Smiley031/Smiley031.htm (5 of 11)3/28/2004 12:16:57 PM
Create a Java Applet
The good news is that in order to run our Java project from within a Web
Page, we need to change
just one of these classes---the GradesGUI class. Here's the code that
currently resides there…
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class GradesGUI {
public static void main(String args[])
{
DrawGUI x = new DrawGUI();
x.addWindowListener(
new WindowAdapter() {
public void windowClosing ( WindowEvent e ) {
System.exit ( 0 );
}
} // end of windowadpater
); // end of windowlistener
} // end of main
} // END OF CLASS
and here's the modified code…
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class GradesApplet extends JApplet {
public void init()
{
DrawGUI x = new DrawGUI();
x.addWindowListener(
new WindowAdapter() {
public void windowClosing ( WindowEvent e )
{
setVisible(false);
} // end of windowClosing
} // end of windowAdpater
); // end of windowListener
} // end of void
} // end of class
The good news here is that most of the code from GradesGUI hasn’t changed
a bit--and neither have
the other nine classes. Java truly lives up to its reputation of permitting us to
build hardware and
operating system independent class modules. In an ideal world we wouldn't
have to change a thing,
http://www.johnsmiley.com/cis18.notfree/Smiley031/Smiley031.htm (6 of 11)3/28/2004 12:16:57 PM
Create a Java Applet
but we do need to make a few changes.
I've made three changes here. First, the Class definition now extends the
JApplet class. JApplet is
used in classes that contain Swing components---think of it as a Swing
enabled version of the Applet
class we used in the previous example. So that you don't confuse this code
with the code you already
have from the end of my Java book, let's name this class GradesApplet…
public class GradesApplet extends JApplet {
The second change is to eliminate the main() method we had previously, and
replace it with the init()
method, which is its Applet counterpart. Remember, Applets may not have a
main() method. We're
using Init() here because this class, as did GradesGUI, really just instantiates
other objects--it doesn't
need to display anything. We want the DrawGUI object to be created when
the Applet object is
created--which is why we placed that code in the init() method.
Those of you who are very observant probably notice that this is a new line of
code…
setVisible(false);
It's necessary to set make instance of the GradesApplet object, displayed in
the Browser, invisible. In
the previous version of the program we executed the exit() method of the
System object--but that's not
necessary here.
Let's run the GradesCalculation Project in a Web
Browser now
That would be great, but unfortunately, our project uses Swing Components,
and as I mentioned
earlier, that will complicate things a little bit.
First of all, current versions of Internet Explorer and Netscape don't know
what to do with Swing
Components. In order to run an Applet containing Swing Components in
either of those two browsers,
it's necessary to first go out to the Sun Website and download what is known
as a Java Plug-in. You
can read more about it here
http://java.sun.com/docs/books/tutorial/uiswing/start/swingApplet.html
and download it from here
http://java.sun.com/products/plugin/
Once you have the plugin downloaded and installed (don't worry, it's
painless), you might be inclined
to code up an HTML file the way we did a few minutes ago and expect the
Grades Calculation project
to be displayed in your favorite Web Browser.
We're close--very close to that---but the Plug-in will complicate matters.
Instead of an HTML document
http://www.johnsmiley.com/cis18.notfree/Smiley031/Smiley031.htm (7 of 11)3/28/2004 12:16:57 PM
Create a Java Applet
that looks like this
<applet code="GradesApplet" width = 200 height=60>
</applet>
instead it needs to look like this…
<HTML>
<BODY>
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
WIDTH = "1200" HEIGHT
= "1200"
codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-
win32.cab#Version=1,3,0,0">
<PARAM NAME = CODE VALUE = "GradesApplet.class" >
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
<PARAM NAME="scriptable" VALUE="false">
</OBJECT>
</BODY>
</HTML>
Looks complicated, doesn’t it? No need to concern yourself with it too much--
just two lines of code
require our attention. First, I've expanded the size of the window within the
browser via this line of code
WIDTH = "1200" HEIGHT = "1200"
and it's this line of code that tells our browser that we wish to instantiate an
instance of or
GradesApplet class…
<PARAM NAME = CODE VALUE = "GradesApplet.class" >
Having compiled GradesApplet into a ByteCode file (in a directory called
\JFiles\GradesApplet) I can
then open this page in a Browser
http://www.johnsmiley.com/cis18.notfree/Smiley031/Smiley031.htm (8 of 11)3/28/2004 12:16:57 PM
Create a Java Applet
and magically, there's our Grades Calculation Project running in a browser.
http://www.johnsmiley.com/cis18.notfree/Smiley031/Smiley031.htm (9 of 11)3/28/2004 12:16:57 PM
Create a Java Applet
Except for the fact that the window says 'Java Applet Window' at the bottom,
we wouldn't even know
that the project is running in a browser.
Test the program--you should find that the functionality is identical to that of
the other version---it
should be, all we've done is change the Startup class to be an Applet.
http://www.johnsmiley.com/cis18.notfree/Smiley031/Smiley031.htm (10 of 11)3/28/2004 12:16:57 PM
Create a Java Applet
Now just close the window--and the Applet stops.
Summary
I hope you’ve enjoyed this article on creating Java Applets. I hope it's given
you the confidence to
create Applets of your own.
Those of you who purchased my Java book, many thanks!
http://www.johnsmiley.com/cis18.notfree/Smiley031/Smiley031.htm (11 of 11)3/28/2004 12:16:57 PM

Você também pode gostar