<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Tue Jun 29 05:55:28 GMT+01:00 1999 -->
<TITLE>
Swing 1.1 API Specification: Class  ImageIcon
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> &nbsp;<FONT ID="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="class-use/ImageIcon.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Swing 1.1</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../javax/swing/GrayFilter.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../javax/swing/JApplet.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="ImageIcon.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.swing</FONT>
<BR>
Class  ImageIcon</H2>
<PRE>
java.lang.Object
  |
  +--<B>javax.swing.ImageIcon</B>
</PRE>
<HR>
<DL>
<DT>public class <B>ImageIcon</B><DT>extends java.lang.Object<DT>implements <A HREF="../../javax/swing/Icon.html">Icon</A>, java.io.Serializable</DL>

<P>
An implementation of the Icon interface that paints Icons
 from Images. Images that are created from a URL or filename
 are preloaded using MediaTracker to monitor the loaded state
 of the image.
 <p>
 <strong>Warning:</strong>
 Serialized objects of this class will not be compatible with 
 future Swing releases.  The current serialization support is appropriate
 for short term storage or RMI between applications running the same
 version of Swing.  A future release of Swing will provide support for
 long term persistence.
<P>
<DL>
<DT><B>See Also: </B><DD><A HREF="../../serialized-form.html#javax.swing.ImageIcon">Serialized Form</A></DL>
<HR>

<P>
<!-- ======== INNER CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;java.awt.Component</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#component">component</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;java.awt.MediaTracker</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#tracker">tracker</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#ImageIcon()">ImageIcon</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an uninitialized image icon.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#ImageIcon(byte[])">ImageIcon</A></B>(byte[]&nbsp;imageData)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an ImageIcon from an array of bytes which were
 read from an image file containing a supported image format,
 such as GIF or JPEG.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#ImageIcon(byte[], java.lang.String)">ImageIcon</A></B>(byte[]&nbsp;imageData,
          java.lang.String&nbsp;description)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an ImageIcon from an array of bytes which were
 read from an image file containing a supported image format,
 such as GIF or JPEG.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#ImageIcon(java.awt.Image)">ImageIcon</A></B>(java.awt.Image&nbsp;image)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an ImageIcon from an image object.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#ImageIcon(java.awt.Image, java.lang.String)">ImageIcon</A></B>(java.awt.Image&nbsp;image,
          java.lang.String&nbsp;description)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an ImageIcon from the image.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#ImageIcon(java.lang.String)">ImageIcon</A></B>(java.lang.String&nbsp;filename)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an ImageIcon from the specified file.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#ImageIcon(java.lang.String, java.lang.String)">ImageIcon</A></B>(java.lang.String&nbsp;filename,
          java.lang.String&nbsp;description)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an ImageIcon from the specified file.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#ImageIcon(java.net.URL)">ImageIcon</A></B>(java.net.URL&nbsp;location)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an ImageIcon from the specified URL.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#ImageIcon(java.net.URL, java.lang.String)">ImageIcon</A></B>(java.net.URL&nbsp;location,
          java.lang.String&nbsp;description)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an ImageIcon from the specified URL.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#getDescription()">getDescription</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the description of the image.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#getIconHeight()">getIconHeight</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the height of the Icon</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#getIconWidth()">getIconWidth</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the width of the Icon</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.awt.Image</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#getImage()">getImage</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Icon's Image</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#getImageLoadStatus()">getImageLoadStatus</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the status of the image loading operation.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.awt.image.ImageObserver</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#getImageObserver()">getImageObserver</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the umage observer for the image</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#loadImage(java.awt.Image)">loadImage</A></B>(java.awt.Image&nbsp;image)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Wait for the image to load</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#paintIcon(java.awt.Component, java.awt.Graphics, int, int)">paintIcon</A></B>(java.awt.Component&nbsp;c,
          java.awt.Graphics&nbsp;g,
          int&nbsp;x,
          int&nbsp;y)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Paints the Icon</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#setDescription(java.lang.String)">setDescription</A></B>(java.lang.String&nbsp;description)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the description of the image.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#setImage(java.awt.Image)">setImage</A></B>(java.awt.Image&nbsp;image)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the image displayed by this icon.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/ImageIcon.html#setImageObserver(java.awt.image.ImageObserver)">setImageObserver</A></B>(java.awt.image.ImageObserver&nbsp;observer)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the image observer for the image.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" ID="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE>clone, 
equals, 
finalize, 
getClass, 
hashCode, 
notify, 
notifyAll, 
toString, 
wait, 
wait, 
wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="component"><!-- --></A><H3>
component</H3>
<PRE>
protected static final java.awt.Component <B>component</B></PRE>
<DL>
</DL>
<HR>

<A NAME="tracker"><!-- --></A><H3>
tracker</H3>
<PRE>
protected static final java.awt.MediaTracker <B>tracker</B></PRE>
<DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="ImageIcon(java.lang.String, java.lang.String)"><!-- --></A><H3>
ImageIcon</H3>
<PRE>
public <B>ImageIcon</B>(java.lang.String&nbsp;filename,
                 java.lang.String&nbsp;description)</PRE>
<DL>
<DD>Creates an ImageIcon from the specified file. The image will
 be preloaded by using MediaTracker to monitor the loading state
 of the image.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>filename</CODE> - the name of the file containing the image<DD><CODE>description</CODE> - a brief textual description of the image<DT><B>See Also: </B><DD><A HREF="../../javax/swing/ImageIcon.html#ImageIcon(java.lang.String)"><CODE>ImageIcon(String)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="ImageIcon(java.lang.String)"><!-- --></A><H3>
ImageIcon</H3>
<PRE>
public <B>ImageIcon</B>(java.lang.String&nbsp;filename)</PRE>
<DL>
<DD>Creates an ImageIcon from the specified file. The image will
 be preloaded by using MediaTracker to monitor the loading state
 of the image. The specified String can be a file name or a
 file path. When specifying a path, use the Internet-standard
 forward-slash ("/") as a separator. For example, specify:<pre>
    new ImageIcon("images/myImage.gif")
 </pre>
 (The string is converted to an URL, so the forward-slash works
 on all systems.)<DD><DL>
<DT><B>Parameters:</B><DD><CODE>filename</CODE> - a String specifying a filename or path</DL>
</DD>
</DL>
<HR>

<A NAME="ImageIcon(java.net.URL, java.lang.String)"><!-- --></A><H3>
ImageIcon</H3>
<PRE>
public <B>ImageIcon</B>(java.net.URL&nbsp;location,
                 java.lang.String&nbsp;description)</PRE>
<DL>
<DD>Creates an ImageIcon from the specified URL. The image will
 be preloaded by using MediaTracker to monitor the loaded state
 of the image.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>URL</CODE> - the URL for the image<DD><CODE>description</CODE> - a brief textual description of the image<DT><B>See Also: </B><DD><A HREF="../../javax/swing/ImageIcon.html#ImageIcon(java.lang.String)"><CODE>ImageIcon(String)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="ImageIcon(java.net.URL)"><!-- --></A><H3>
ImageIcon</H3>
<PRE>
public <B>ImageIcon</B>(java.net.URL&nbsp;location)</PRE>
<DL>
<DD>Creates an ImageIcon from the specified URL. The image will
 be preloaded by using MediaTracker to monitor the loaded state
 of the image.</DL>
<HR>

<A NAME="ImageIcon(java.awt.Image, java.lang.String)"><!-- --></A><H3>
ImageIcon</H3>
<PRE>
public <B>ImageIcon</B>(java.awt.Image&nbsp;image,
                 java.lang.String&nbsp;description)</PRE>
<DL>
<DD>Creates an ImageIcon from the image.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>image</CODE> - the image<DD><CODE>description</CODE> - a brief textual description of the image</DL>
</DD>
</DL>
<HR>

<A NAME="ImageIcon(java.awt.Image)"><!-- --></A><H3>
ImageIcon</H3>
<PRE>
public <B>ImageIcon</B>(java.awt.Image&nbsp;image)</PRE>
<DL>
<DD>Creates an ImageIcon from an image object.</DL>
<HR>

<A NAME="ImageIcon(byte[], java.lang.String)"><!-- --></A><H3>
ImageIcon</H3>
<PRE>
public <B>ImageIcon</B>(byte[]&nbsp;imageData,
                 java.lang.String&nbsp;description)</PRE>
<DL>
<DD>Creates an ImageIcon from an array of bytes which were
 read from an image file containing a supported image format,
 such as GIF or JPEG.  Normally this array is created
 by reading an image using Class.getResourceAsStream(), but
 the byte array may also be statically stored in a class.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>imageData</CODE> - an array of pixels in an image format supported
         by the AWT Toolkit, such as GIF or JPEG.<DD><CODE>description</CODE> - a brief textual description of the image<DT><B>See Also: </B><DD><CODE>Toolkit.createImage(java.awt.image.ImageProducer)</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="ImageIcon(byte[])"><!-- --></A><H3>
ImageIcon</H3>
<PRE>
public <B>ImageIcon</B>(byte[]&nbsp;imageData)</PRE>
<DL>
<DD>Creates an ImageIcon from an array of bytes which were
 read from an image file containing a supported image format,
 such as GIF or JPEG.  Normally this array is created
 by reading an image using Class.getResourceAsStream(), but
 the byte array may also be statically stored in a class.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>an</CODE> - array of pixels in an image format supported by
         the AWT Toolkit, such as GIF or JPEG.<DT><B>See Also: </B><DD><CODE>Toolkit.createImage(java.awt.image.ImageProducer)</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="ImageIcon()"><!-- --></A><H3>
ImageIcon</H3>
<PRE>
public <B>ImageIcon</B>()</PRE>
<DL>
<DD>Creates an uninitialized image icon.</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="loadImage(java.awt.Image)"><!-- --></A><H3>
loadImage</H3>
<PRE>
protected void <B>loadImage</B>(java.awt.Image&nbsp;image)</PRE>
<DL>
<DD>Wait for the image to load<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getImageLoadStatus()"><!-- --></A><H3>
getImageLoadStatus</H3>
<PRE>
public int <B>getImageLoadStatus</B>()</PRE>
<DL>
<DD>Returns the status of the image loading operation.<DD><DL>
<DT><B>Returns:</B><DD>the loading status as defined by java.awt.MediaTracker.<DT><B>See Also: </B><DD><CODE>MediaTracker.ABORTED</CODE>, 
<CODE>MediaTracker.ERRORED</CODE>, 
<CODE>MediaTracker.COMPLETE</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="getImage()"><!-- --></A><H3>
getImage</H3>
<PRE>
public java.awt.Image <B>getImage</B>()</PRE>
<DL>
<DD>Returns the Icon's Image<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setImage(java.awt.Image)"><!-- --></A><H3>
setImage</H3>
<PRE>
public void <B>setImage</B>(java.awt.Image&nbsp;image)</PRE>
<DL>
<DD>Set the image displayed by this icon.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getDescription()"><!-- --></A><H3>
getDescription</H3>
<PRE>
public java.lang.String <B>getDescription</B>()</PRE>
<DL>
<DD>Get the description of the image.  This is meant to be a brief
 textual description of the object.  For example, it might be
 presented to a blind user to give an indication of the purpose
 of the image.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setDescription(java.lang.String)"><!-- --></A><H3>
setDescription</H3>
<PRE>
public void <B>setDescription</B>(java.lang.String&nbsp;description)</PRE>
<DL>
<DD>Set the description of the image.  This is meant to be a brief
 textual description of the object.  For example, it might be
 presented to a blind user to give an indication of the purpose
 of the image.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="paintIcon(java.awt.Component, java.awt.Graphics, int, int)"><!-- --></A><H3>
paintIcon</H3>
<PRE>
public void <B>paintIcon</B>(java.awt.Component&nbsp;c,
                      java.awt.Graphics&nbsp;g,
                      int&nbsp;x,
                      int&nbsp;y)</PRE>
<DL>
<DD>Paints the Icon<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../javax/swing/Icon.html#paintIcon(java.awt.Component, java.awt.Graphics, int, int)">paintIcon</A> in interface <A HREF="../../javax/swing/Icon.html">Icon</A></DL>
</DD>
</DL>
<HR>

<A NAME="getIconWidth()"><!-- --></A><H3>
getIconWidth</H3>
<PRE>
public int <B>getIconWidth</B>()</PRE>
<DL>
<DD>Get the width of the Icon<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../javax/swing/Icon.html#getIconWidth()">getIconWidth</A> in interface <A HREF="../../javax/swing/Icon.html">Icon</A></DL>
</DD>
</DL>
<HR>

<A NAME="getIconHeight()"><!-- --></A><H3>
getIconHeight</H3>
<PRE>
public int <B>getIconHeight</B>()</PRE>
<DL>
<DD>Get the height of the Icon<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../javax/swing/Icon.html#getIconHeight()">getIconHeight</A> in interface <A HREF="../../javax/swing/Icon.html">Icon</A></DL>
</DD>
</DL>
<HR>

<A NAME="setImageObserver(java.awt.image.ImageObserver)"><!-- --></A><H3>
setImageObserver</H3>
<PRE>
public void <B>setImageObserver</B>(java.awt.image.ImageObserver&nbsp;observer)</PRE>
<DL>
<DD>Set the image observer for the image.  Set this
 property if the ImageIcon contains an animated GIF, so
 the observer is notified to update its display.
 For example:
 <pre>
     icon = new ImageIcon(...)
     button.setIcon(icon);
     icon.setImageObserver(button);
 </pre><DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getImageObserver()"><!-- --></A><H3>
getImageObserver</H3>
<PRE>
public java.awt.image.ImageObserver <B>getImageObserver</B>()</PRE>
<DL>
<DD>Return the umage observer for the image<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> &nbsp;<FONT ID="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="class-use/ImageIcon.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Swing 1.1</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../javax/swing/GrayFilter.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../javax/swing/JApplet.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="ImageIcon.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>Java is a trademark or registered trademark of Sun Microsystems,  Inc. in the US and other countries.<br>Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font>
</BODY>
</HTML>
