<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Java(TM) Language Basics, Part 1, Lesson 4: Building A User Interface</TITLE>
<META NAME="AUTHOR" CONTENT="Monica Pawlan">
<META NAME="KEYWORDS" CONTENT="programming, basics, Java 2">
<META NAME="OWNER" CONTENT="Editorial/JDC">
<META NAME="revision" CONTENT="@(#)front.src 1.34 03/09/00 JDC">
<STYLE TYPE="text/css">
<!--
CODE {font-family: Courier, Monospace;
font-size: 12pt}
PRE {font-family: Courier, Monospace;
font-size: 11pt}
-->
</STYLE>
</HEAD>
<!-- Start Body Insert-->
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" ALINK="#FF0000" VLINK="#660066">
<!-- End Body Insert-->
<!-- Start PageTop Insert -->
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR ALIGN="CENTER" VALIGN="TOP">
<TD WIDTH="157" ALIGN="LEFT">
<IMG SRC="/images/pixel.gif" HEIGHT="40" WIDTH="40" ALT="">
<A HREF="
http://java.sun.com/index.html"><IMG SRC="/images/javalogo52x88.gif" WIDTH="52" HEIGHT="88" ALT="Java Technology Home Page" BORDER="0"></A>
<BR>
<IMG SRC="/images/pixel.gif" WIDTH="157" HEIGHT="1" ALT=""></TD>
<TD>
<FORM NAME="seek1" METHOD="GET" ACTION="
http://search.java.sun.com/query.html">
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
<TR>
<TD ALIGN="RIGHT">
<IMG SRC="/images/stripelt.gif" WIDTH="6" HEIGHT="14" ALT=""></TD>
<TD WIDTH="100%">
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
<TR>
<TD BGCOLOR="#CC9966" WIDTH="100%">
<IMG SRC="/images/pixel.gif" HEIGHT="2" WIDTH="1" ALT=""></TD>
</TR>
<TR>
<TD>
<IMG SRC="/images/pixel.gif" HEIGHT="2" WIDTH="1" ALT=""></TD>
</TR>
<TR>
<TD BGCOLOR="#CC9966">
<IMG SRC="/images/pixel.gif" HEIGHT="2" WIDTH="1" ALT=""></TD>
</TR>
<TR>
<TD>
<IMG SRC="/images/pixel.gif" HEIGHT="2" WIDTH="1" ALT=""></TD>
</TR>
<TR>
<TD BGCOLOR="#CC9966">
<IMG SRC="/images/pixel.gif" HEIGHT="2" WIDTH="1" ALT=""></TD>
</TR>
<TR>
<TD>
<IMG SRC="/images/pixel.gif" HEIGHT="2" WIDTH="1" ALT=""></TD>
</TR>
<TR>
<TD BGCOLOR="#CC9966">
<IMG SRC="/images/pixel.gif" HEIGHT="2" WIDTH="1" ALT=""></TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="LEFT">
<IMG SRC="/images/stripert.gif" WIDTH="6" HEIGHT="14" ALT=""></TD>
<TD>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
<TR>
<TD VALIGN="CENTER">
<A HREF="
http://java.sun.com/a-z/index.html"><IMG SRC="/images/azindex.gif" BORDER="0" WIDTH="72" HEIGHT="11" ALT="A-Z Index"></A></TD>
<TD VALIGN="CENTER">
<FONT FACE="Helvetica" SIZE="1">
<INPUT TYPE="text" SIZE="15" MAXLENGTH="128" NAME=qt></FONT></TD>
<TD VALIGN="CENTER">
<INPUT TYPE="image" SRC="/images/search.button.gif" WIDTH="55" HEIGHT="14" ALT="Search" value="search" BORDER="0"></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</FORM>
<P>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="0" CELLSPACING="0">
<TR VALIGN="TOP">
<TD WIDTH="100%"><IMG SRC="/images/chiclet.row.gif" WIDTH="55"
HEIGHT="18" ALT=""></TD>
<TD ROWSPAN="4" ALIGN="RIGHT" WIDTH="152">
<A HREF="/developer/index.html"><IMG SRC="/images/developer.connection.header.gif" BORDER="0" HEIGHT="42" WIDTH="319" ALT="Java Developer Connection(SM)"></A></TD>
</TR>
<TR VALIGN="TOP">
<TD BGCOLOR="#FFFFFF" HEIGHT="1" WIDTH="100%">
<IMG SRC="/images/pixel.gif" HEIGHT="1" WIDTH="1" ALT=""></TD>
</TR>
<TR VALIGN="TOP">
<TD BGCOLOR="#CC9966" HEIGHT="1" WIDTH="100%">
<IMG SRC="/images/pixel.gif" HEIGHT="1" WIDTH="1" ALT=""></TD>
</TR>
<TR VALIGN="TOP">
<TD><A HREF="/developer/onlineTraining/"><IMG SRC="/images/online-training.gif" WIDTH="165" HEIGHT="22" ALT="Online Training" BORDER=0></A></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
<!-- End PageTop Insert -->
<!-- Start NavBar Insert -->
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="3" BGCOLOR="#FFFFFF" WIDTH="157" ALIGN="LEFT">
<!-- tab categories -->
<TR>
<TD><A HREF="
http://java.sun.com/products/"><IMG SRC="/images/side.tab.products.gif" HEIGHT="15" WIDTH="130" BORDER="0" ALT="Downloads, APIs, Documentation"></A></TD>
</TR>
<TR>
<TD><A HREF="/developer/index.html"><IMG SRC="/images/side.tab.developer.gif" HEIGHT="15" WIDTH="130" BORDER="0" ALT="Java Developer Connection"></A></TD>
</TR>
<TR>
<TD><A HREF="/developer/infodocs/index.shtml"><IMG SRC="/images/side.tab.docs.gif" HEIGHT="15" WIDTH="130" BORDER="0" ALT="Tutorials, Tech Articles, Training"></A></TD>
</TR>
<TR>
<TD><A HREF="/developer/support/index.html"><IMG SRC="/images/side.tab.support.gif" HEIGHT="15" WIDTH="130" BORDER="0" ALT="Online Support"></A></TD>
</TR>
<TR>
<TD><A HREF="/developer/community/index.html"><IMG SRC="/images/side.tab.community.gif" HEIGHT="15" WIDTH="130" BORDER="0" ALT="Community Discussion"></A></TD>
</TR>
<TR>
<TD><A HREF="
http://java.sun.com/industry/"><IMG SRC="/images/side.tab.news.gif" HEIGHT="15" WIDTH="130" BORDER="0" ALT="News & Events from Everywhere"></A></TD>
</TR>
<TR>
<TD><A HREF="
http://java.sun.com/solutions"><IMG SRC="/images/side.tab.solutions.gif" HEIGHT="15" WIDTH="130" BORDER="0" ALT="Products from Everywhere"></A></TD>
</TR>
<TR>
<TD><A HREF="
http://java.sun.com/casestudies"><IMG SRC="/images/side.tab.case.gif" HEIGHT="15" WIDTH="130" BORDER="0" ALT="How Java Technology is Used Worldwide"></A></TD>
</TR>
<TR>
<TD> <DIV ALIGN="RIGHT">
<A HREF="/servlet/PrintPageServlet"><IMG SRC="/images/printbutton.gif" WIDTH="155" HEIGHT="25" ALT="Print Button" BORDER="0"></A>
</DIV>
</TD>
</TR>
<TR><TD> </TD></TR>
<!-- End NavBar Insert -->
<!-- START SUB-NAV -->
<TR>
<TD><!-- INSERT SUB-NAV INFO -->
</TD>
</TR>
<!-- END SUB-NAV -->
</TABLE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
<TR>
<TD>
<FONT FACE="Verdana, Arial, Helvetica, sans-serif">
<!-- Template Version 2.0 -->
<!-- ================== -->
<!-- Start Main Content -->
<!-- ================== -->
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
<TR>
<TD VALIGN="TOP">
<FONT FACE="Verdana, Arial, Helvetica, sans-serif">
<A NAME="top"></A>
<DIV ALIGN="RIGHT">
<FONT SIZE="-1"><A HREF="/developer/onlineTraining/index.html">Training Index</A></FONT>
<H2>Java<FONT SIZE="-2"><SUP>TM</SUP></FONT> Programming Language Basics, Part 1<BR>
<FONT SIZE="3">Lesson 4: Building A User Interface</FONT></H2>
<FONT SIZE="-1">[<A HREF="applet.html"><<BACK</A>] [<A HREF="index.html#contents">CONTENTS</A>] [<A HREF="servlet.html">NEXT>></A>]</FONT></DIV>
<P>
In the last lesson you saw how the <CODE>Applet</CODE> class
provides a <CODE>Panel</CODE> component so you can design the applet's
user interface. This lesson expands the basic application from
Lessons 1 and 2 to give it a user interface using the
Java<FONT SIZE="-2"><SUP>TM</SUP></FONT> Foundation Classes (JFC) Project Swing APIs
that handle user events.
<UL>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">
<A HREF="#swing">Project Swing APIs</A></FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">
<A HREF="#import">Import Statements</A></FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">
<A HREF="#decl">Class Declaration</A></FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">
<A HREF="#instance">Instance Variables</A></FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">
<A HREF="#const">Constructor</A></FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">
<A HREF="#listen">Action Listening</A></FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">
<A HREF="#event">Event Handling</A></FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">
<A HREF="#main">Main Method</A></FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">
<A HREF="#applets">Applets Revisited</A></FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">
<A HREF="#more">More Information</A></FONT>
</UL>
<HR>
<A NAME="swing"></A>
<H2>Project Swing APIs</H2>
<IMG SRC="./Art/panel.gif" WIDTH="178" HEIGHT="123" ALT="" ALIGN="LEFT" HSPACE=10 VSPACE=5>
In contrast to the applet in Lesson 3 where the user interface
is attached to a panel object nested in a top-level browser,
the Project Swing application in this lesson
attaches its user interface to a panel object nested in a top-level
frame object. A frame object is a top-level window that provides a
title, banner, and methods to manage the appearance and behavior
of the window.
<P>
The Project Swing code that follows builds this simple application.
The window on the left appears when you start the application,
and the window on the right appears when you click the button.
Click again and you are back to the original window on the left.
<P>
<TABLE>
<TR><TD WIDTH=200 ALIGN=CENTER><FONT FACE="Verdana, Arial, Helvetica, sans-serif">
<IMG SRC="./Art/swing1.gif" WIDTH="159" HEIGHT="89" ALT=""><P>When Application Starts</FONT>
</TD><TD ALIGN=CENTER><FONT FACE="Verdana, Arial, Helvetica, sans-serif">
<IMG SRC="./Art/swing2.gif" WIDTH="159" HEIGHT="89" ALT=""><P>When Button Clicked</FONT>
</TD></TR>
</TABLE>
<A NAME="import"></A>
<H3>Import Statements</H3>
Here is the <A HREF="./Code/SwingUI.java">SwingUI.java</A> code.
At the top, you have four lines of import statements. The lines
indicate exactly which Java<FONT SIZE="-2"><SUP>TM</SUP></FONT>
API classes the program uses.
You could replace four of these lines with this one line:
<CODE>import java.awt.*;</CODE>, to import the entire
<CODE>awt</CODE> package, but doing that increases compilation
overhead than importing exactly the classes you need and
no others.
</FONT>
<PRE>
import java.awt.Color;
import java.awt.BorderLayout;
import java.awt.event.*;
import javax.swing.*;
</PRE>
<FONT FACE="Verdana, Arial, Helvetica, sans-serif">
<A NAME="decl"></A>
<H3>Class Declaration</H3>
The class declaration comes next and indicates the top-level
frame for the application's user interface is a
<CODE>JFrame</CODE> that implements the <CODE>ActionListener</CODE>
interface.
</FONT>
<PRE>
class SwingUI extends JFrame
implements ActionListener{
</PRE>
<FONT FACE="Verdana, Arial, Helvetica, sans-serif">
<P>
The <CODE>JFrame</CODE> class extends the
<CODE>Frame</CODE> class that is part of the Abstract Window Toolkit
(AWT) APIs. Project Swing extends the AWT with a full set of GUI
components and services, pluggable look and feel capabilities,
and assistive technology support. For a more detailed introduction
to Project Swing, see the
<A HREF="
http://java.sun.com/products/jfc/tsc/index.html">Swing Connection</A>,
and <A HREF="/developer/onlineTraining/GUI/Swing1/index.html">Fundamentals of Swing, Part 1</A>.
<P>
The Java APIs provide classes and interfaces for you to use.
An interface defines a set of methods, but does not implement
them. The rest of the <CODE>SwingUI</CODE> class declaration
indicates that this class will implement the
<CODE>ActionListener</CODE> interface. This means the <CODE>SwingUI</CODE>
class must implement all methods defined in the
<CODE>ActionListener</CODE> interface. Fortunately, there is only
one, <CODE>actionPerformed</CODE>, which is discussed below.
<A NAME="instance"></A>
<H3>Instance Variables</H3>
These next lines declare the Project Swing component classes
the <CODE>SwingUI</CODE> class uses. These are instance variables
that can be accessed by any method in the instantiated class.
In this example, they are built in the <CODE>SwingUI</CODE>
constructor and accessed in the <CODE>actionPerformed</CODE> method
implementation. The <CODE>private boolean</CODE> instance variable
is visible only to the <CODE>SwingUI</CODE> class and is
used in the <CODE>actionPerformed</CODE>method to find out
whether or not the button has been clicked.
</FONT>
<PRE>
JLabel text, clicked;
JButton button, clickButton;
JPanel panel;
private boolean _clickMeMode = true;
</PRE>
<FONT FACE="Verdana, Arial, Helvetica, sans-serif">
<A NAME="const"></A>
<H3>Constructor</H3>
The constructor (shown below) creates the user interface components
and <CODE>JPanel</CODE> object, adds the components to the
<CODE>JPanel</CODE> object, adds the panel
to the frame, and makes the <CODE>JButton</CODE> components
event listeners. The <CODE>JFrame</CODE> object is created
in the <CODE>main</CODE> method when the program starts.
</FONT>
<PRE>
SwingUI(){
text = new JLabel("I'm a Simple Program");
clicked = new JLabel("Button Clicked");
button = new JButton("Click Me");
//Add button as an event listener
button.addActionListener(this);
clickButton = new JButton("Click Again");
//Add button as an event listener
clickButton.addActionListener(this);
//Create panel
panel = new JPanel();
//Specify layout manager and background color
panel.setLayout(new BorderLayout(1,1));
panel.setBackground(Color.white);
//Add label and button to panel
getContentPane().add(panel);
panel.add(BorderLayout.CENTER, text);
panel.add(BorderLayout.SOUTH, button);
}
</PRE>
<FONT FACE="Verdana, Arial, Helvetica, sans-serif">
<BR CLEAR=ALL>
<IMG SRC="./Art/border2.gif" WIDTH="222" HEIGHT="175" ALT="" ALIGN=LEFT HSPACE=10>
When the <CODE>JPanel</CODE> object is created, the layout
manager and background color are specified.
The layout manager in use determines how user interface components are
arranged on the display area.
<P>
The code uses the
<CODE>BorderLayout</CODE> layout manager, which arranges
user interface components in the five areas shown at
left. To add a component, specify the area
(north, south, east, west, or center).
<BR CLEAR=ALL>
</FONT>
<PRE>
//Create panel
panel = new JPanel();
//Specify layout manager and background color
panel.setLayout(new BorderLayout(1,1));
panel.setBackground(Color.white);
//Add label and button to panel
getContentPane().add(panel);
panel.add(BorderLayout.CENTER, text);
panel.add(BorderLayout.SOUTH, button);
}
</PRE>
<FONT FACE="Verdana, Arial, Helvetica, sans-serif">
To find out about some of the other
available layout managers and how to use them, see the JDC article
<A HREF="/developer/technicalArticles/GUI/AWTLayoutMgr/index.html">Exploring
the AWT Layout Managers</A>.
<P>
The call to the <CODE>getContentPane</CODE> method of the
<CODE>JFrame</CODE> class is for adding the <CODE>Panel</CODE>
to the <CODE>JFrame</CODE>.
Components are not added directly to a
<CODE>JFrame</CODE>, but to its content pane. Because the
layout manager controls the layout of components, it is set
on the content pane where the components reside. A content
pane provides functionality that allows different types of
components to work together in Project Swing.
<A NAME="listen"></A>
<H3>Action Listening</H3>
In addition to implementing the <CODE>ActionListener</CODE>
interface,
you have to add the event listener to the JButton components. An action listener is the
SwingUI object because it implements the ActionListener interface. In this example,
when the end user clicks the button, the underlying Java platform services pass the
action (or event) to the actionPerformed method. In your code, you implement the
actionPerformed method to take the appropriate action based on which button is
clicked..
<P>
The component classes have the appropriate add methods to add action listeners to them.
In the code the JButton class has an addActionListener method. The parameter passed to
addActionListener is this, which means the SwingUI action listener is added to the
button so button-generated actions are passed to the actionPerformed method in the
SwingUI object.
</FONT>
<PRE>
button = new JButton("Click Me");
//Add button as an event listener
button.addActionListener(this);
</PRE>
<FONT FACE="Verdana, Arial, Helvetica, sans-serif">
<A NAME="event"></A>
<H3>Event Handling</H3>
The actionPerformed method is passed an event object that represents the action event
that occurred. Next, it uses an if statement to find out which component had the event,
and takes action according to its findings.
</FONT>
<PRE>
public void actionPerformed(ActionEvent event){
Object source = event.getSource();
if (_clickMeMode) {
text.setText("Button Clicked");
button.setText("Click Again");
_clickMeMode = false;
} else {
text.setText("I'm a Simple Program");
button.setText("Click Me");
_clickMeMode = true;
}
}
</PRE>
<FONT FACE="Verdana, Arial, Helvetica, sans-serif">
You can find information on event handling for the different components in
<A HREF="
http://java.sun.com/docs/books/tutorial/index.html">The Java Tutorial</A>
section on
<A HREF="
http://java.sun.com/docs/books/tutorial/ui/swingOverview/event.html">Event
Handling</A>.
<A NAME="main"></A>
<H3>Main Method</H3>
The <CODE>main</CODE> method creates the top-level <CODE>frame</CODE>,
sets the title, and includes code that lets the end user close
the window using the frame menu.
</FONT>
<PRE>
public static void main(String[] args){
//Create top-level frame
SwingUI frame = new SwingUI();
frame.setTitle("Example");
//This code lets you close the window
WindowListener l = new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
};
frame.addWindowListener(l);
//This code lets you see the frame
frame.pack();
frame.setVisible(true);
}
}
</PRE>
<FONT FACE="Verdana, Arial, Helvetica, sans-serif">
The code for closing the window shows an easy way to add event handling functionality to a
program. If the event listener interface you need provides more functionality than the program
actually uses, use an adapter class. The Java APIs provide adapter classes for all listener
interfaces with more than one method. This way, you can use the adapter class instead of the
listener interface and implement only the methods you need. In the example, the WindowListener
interface has 7 methods and this program needs only the windowClosing method so it makes sense
to use the WindowAdapter class instead.
<P>
This code extends the WindowAdapter class and overrides the windowClosing method. The new
keyword creates an anonymous instance of the extended inner class. It is anonymous because you
are not assigning a name to the class and you cannot create another instance of the class
without executing the code again. It is an inner class because the extended class definition is
nested within the SwingUI class.
<P>
This approach takes only a few lines of code, while implementing the WindowListener interface
would require 6 empty method implementations. Be sure to add the WindowAdapter object to the
frame object so the frame object will listen for window events.
</FONT>
<PRE>
WindowListener l = new WindowAdapter() {
//The instantiation of object l is extended to
//include this code:
public void windowClosing(WindowEvent e){
System.exit(0);
}
};
frame.addWindowListener(l);
</PRE>
<FONT FACE="Verdana, Arial, Helvetica, sans-serif">
<A NAME="applets"></A>
<H3>Applets Revisited</H3>
Using what you learned in
<A HREF="./Code/SimpleApplet.java">Lesson 3: Building Applets</A>
and this lesson, convert the example for
<A HREF="./Code/SwingUI.java">this lesson</A> into
an applet. Give it a try before looking at the
<A HREF="./Code/ApptoAppl.java">solution</A>.
<P>
<IMG SRC="./Art/apptoappl.gif" WIDTH="212" HEIGHT="187" ALT="">
<P>
In short, the differences between the applet and application
versions are the following:
<UL>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">The
applet class is declared <CODE>public</CODE> so
<CODE>appletviewer</CODE> can access it. </FONT>
<P>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">The
applet class descends from <CODE>Applet</CODE>
and the application class descends from <CODE>JFrame</CODE>.</FONT>
<P>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">The
applet version has no <CODE>main</CODE> method. </FONT>
<P>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">The
application constructor is replaced in the applet by
<CODE>start</CODE> and <CODE>init</CODE> methods.</FONT>
<P>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">GUI
components are added directly to the <CODE>Applet</CODE>; whereas,
in the case of an application, GUI components are added to the content pane of its
<CODE>JFrame</CODE> object.</FONT>
</UL>
<A NAME="more"></A>
<H3>More Information</H3>
For more information on Project Swing, see the
<A HREF="
http://java.sun.com/products/jfc/tsc/index.html">Swing
Connection</A>,
and <A HREF="/developer/onlineTraining/GUI/Swing1/index.html">Fundamentals
of Swing, Part 1</A>.
<P>
Also see
<A HREF="
http://java.sun.com/docs/books/tutorial/uiswing/">The JFC
Project Swing Tutorial: A Guide to Constructing GUIs</A>.
<P>
To find out about some of the other
available layout managers and how to use them, see the JDC article
<A HREF="/developer/technicalArticles/GUI/AWTLayoutMgr/index.html">Exploring
the AWT Layout Managers</A>.
<P ALIGN="RIGHT">
<FONT SIZE="-1">[<A HREF="#top">TOP</A>]</FONT>
</FONT>
</TD>
</TR>
</TABLE>
<!-- ================ -->
<!-- End Main Content -->
<!-- ================ -->
</FONT>
</TD>
</TR>
</TABLE>
<!-- Copyright Insert -->
<BR CLEAR="ALL">
<FORM ACTION="/cgi-bin/search.cgi" METHOD="POST">
<TABLE WIDTH="100%" CELLPADDING="0" BORDER="0" CELLSPACING="5">
<TR>
<TD VALIGN="BOTTOM">
</TD>
</TR>
<A HREF="/servlet/PrintPageServlet"><IMG SRC="/images/printbutton.gif" WIDTH="155" HEIGHT="25" ALT="Print Button" BORDER="0"></A>
<CENTER>
<FONT SIZE="-1" COLOR="#999999" FACE="Verdana, Arial, Helvetica, sans-serif">
[ This page was updated: <!-- new date --> 31-Mar-2000 ]
</font></CENTER>
</TD>
</TR>
<TR>
<TD BGCOLOR="#CCCCCC">
<IMG SRC="/images/pixel.gif" HEIGHT="1" WIDTH="1" ALT=""></TD>
</TR>
<TR>
<TD>
<CENTER>
<FONT SIZE="-2" FACE="Verdana, Arial, Helvetica, sans-serif">
<A HREF="
http://java.sun.com/products/">Products & APIs</A> |
<A HREF="/developer/index.html">Developer Connection</A> |
<A HREF="/developer/infodocs/index.shtml">Docs & Training</A> |
<A HREF="/developer/support/index.html">Online Support</A><BR>
<A HREF="/developer/community/index.html">Community Discussion</A> |
<A HREF="
http://java.sun.com/industry/">Industry News</A> |
<A HREF="
http://java.sun.com/solutions">Solutions Marketplace</A> |
<A HREF="
http://java.sun.com/casestudies">Case Studies</A>
</FONT>
</CENTER>
</TD>
</TR>
<TR>
<TD BGCOLOR="#CCCCCC">
<IMG SRC="/images/pixel.gif" HEIGHT="1" WIDTH="1" ALT=""></TD>
</TR>
<TR>
<TD ALIGN="CENTER">
<FONT SIZE="-2" FACE="Verdana, Arial, Helvetica, sans-serif">
<A HREF="
http://java.sun.com/docs/glossary.html">Glossary</A> -
<A HREF="
http://java.sun.com/applets/">Applets</A> -
<A HREF="
http://java.sun.com/docs/books/tutorial/">Tutorial</A> -
<A HREF="
http://java.sun.com/jobs/">Employment</A> -
<A HREF="
http://java.sun.com/nav/business/">Business & Licensing</A> -
<A HREF="
http://java.sun.com/javastore/">Java Store</A> -
<A HREF="
http://java.sun.com/casestudies/">Java in the Real World</A>
</FONT>
</TD>
</TR>
<TR>
<TD>
<CENTER>
<FONT SIZE="-2" FACE="Verdana, Arial, Helvetica, sans-serif">
<a href="/siteinfo/faq.html">FAQ</a> |
<a href="/feedback/index.html">Feedback</a> |
<a href="
http://www.dynamicdiagrams.net/mapa/cgi-bin/help.tcl?db=javasoft&dest=
http://java.sun.com/">Map</a> |
<A HREF="
http://java.sun.com/a-z/index.html">A-Z Index</A>
</FONT>
</CENTER>
</TD>
</TR>
<TR>
<TD>
<TABLE WIDTH="100%" CELLPADDING="0" BORDER="0" CELLSPACING="0">
<TR>
<TD WIDTH="50%">
<FONT SIZE="-2" FACE="Verdana, Arial, Helvetica, sans-serif">
For more information on Java technology<BR>
and other software from Sun Microsystems, call:<BR>
</FONT>
<FONT SIZE="-1" FACE="Verdana, Arial, Helvetica, sans-serif">
(800) 786-7638<BR></FONT>
<FONT SIZE="-2" FACE="Verdana, Arial, Helvetica, sans-serif">
Outside the U.S. and Canada, dial your country's
<A HREF="
http://www.att.com/business_traveler/attdirecttollfree/">AT&T Direct Access Number</A> first.<BR>
</FONT>
</TD>
<TD ALIGN="RIGHT" WIDTH="50%">
<A HREF="
http://www.sun.com"><IMG SRC="/images/lgsun.gif" width="64" height="30" border="0" ALT="Sun Microsystems, Inc."></A><BR>
<FONT SIZE="-2" FACE="Verdana, Arial, Helvetica, sans-serif">
Copyright © 1995-2000
<A HREF="
http://www.sun.com">Sun Microsystems, Inc.</A><BR>
All Rights Reserved.
<A HREF="
http://www.sun.com/share/text/termsofuse.html">Terms of Use</A>.
<A HREF="
http://www.sun.com/privacy/">Privacy Policy</A>.
</FONT>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</FORM>
<!-- End Copyright Insert -->
</BODY>
</HTML>