<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.awt.Point
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.html">This Package</a>  <a href="java.awt.Panel.html#_top_">Previous</a>  <a href="java.awt.Polygon.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.awt.Point
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----java.awt.Point
</pre>
<hr>
<dl>
  <dt> public class <b>Point</b>
  <dt> extends <a href="java.lang.Object.html#_top_">Object</a>
  <dt> implements <a href="java.io.Serializable.html#_top_">Serializable</a>
</dl>
The <code>Point</code> class represents a location in a
 two-dimensional (<i>x</i>,&nbsp;<i>y</i>) coordinate space.
<p>
<hr>
<a name="index"></a>
<h2>
  <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index">
</h2>
<dl>
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#x"><b>x</b></a>
  <dd>  The <i>x</i> coordinate.
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#y"><b>y</b></a>
  <dd>  The <i>y</i> coordinate.
</dl>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Point()"><b>Point</b></a>()
  <dd>  Constructs and initializes a point at the origin 
 (0,&nbsp;0) of the coordinate space.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Point(int, int)"><b>Point</b></a>(int, int)
  <dd>  Constructs and initializes a point at the specified 
 (<i>x</i>,&nbsp;<i>y</i>) location in the coordinate space.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Point(java.awt.Point)"><b>Point</b></a>(Point)
  <dd>  Constructs and initializes a point with the same location as
 the specified <code>Point</code> object.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#equals(java.lang.Object)"><b>equals</b></a>(Object)
  <dd>  Determines whether two points are equal.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getLocation()"><b>getLocation</b></a>()
  <dd>  Returns the location of this point.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#hashCode()"><b>hashCode</b></a>()
  <dd>  Returns the hashcode for this point.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#move(int, int)"><b>move</b></a>(int, int)
  <dd>  Moves this point to the specificed location in the 
 (<i>x</i>,&nbsp;<i>y</i>) coordinate plane.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setLocation(int, int)"><b>setLocation</b></a>(int, int)
  <dd>  Changes the point to have the specificed location.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setLocation(java.awt.Point)"><b>setLocation</b></a>(Point)
  <dd>  Sets the location of the point to the specificed location.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toString()"><b>toString</b></a>()
  <dd>  Returns a representation of this point and its location
 in the (<i>x</i>,&nbsp;<i>y</i>) coordinate space as a string.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#translate(int, int)"><b>translate</b></a>(int, int)
  <dd>  Translates this point, at location (<i>x</i>,&nbsp;<i>y</i>), 
 by <code>dx</code> along the <i>x</i> axis and <code>dy</code> 
 along the <i>y</i> axis so that it now represents the point 
 (<code>x</code>&nbsp;<code>+</code>&nbsp;<code>dx</code>, 
 <code>y</code>&nbsp;<code>+</code>&nbsp;<code>dy</code>).
</dl>
<a name="variables"></a>
<h2>
  <img src="images/variables.gif" width=153 height=38 alt="Variables">
</h2>
<a name="x"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>x</b>
<pre>
 public int x
</pre>
<dl>
  <dd> The <i>x</i> coordinate.<p>
</dl>
<a name="y"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>y</b>
<pre>
 public int y
</pre>
<dl>
  <dd> The <i>y</i> coordinate.<p>
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="Point"></a>
<a name="Point()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Point</b>
<pre>
 public Point()
</pre>
<dl>
  <dd> Constructs and initializes a point at the origin 
 (0,&nbsp;0) of the coordinate space.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> x - the <i>x</i> coordinate.
    <dd> y - the <i>y</i> coordinate.
  </dl></dd>
</dl>
<a name="Point(java.awt.Point)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Point</b>
<pre>
 public Point(<a href="#_top_">Point</a> p)
</pre>
<dl>
  <dd> Constructs and initializes a point with the same location as
 the specified <code>Point</code> object.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> p - a point.
  </dl></dd>
</dl>
<a name="Point(int, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Point</b>
<pre>
 public Point(int x,
              int y)
</pre>
<dl>
  <dd> Constructs and initializes a point at the specified 
 (<i>x</i>,&nbsp;<i>y</i>) location in the coordinate space.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> x - the <i>x</i> coordinate.
    <dd> y - the <i>y</i> coordinate.
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="getLocation()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getLocation"><b>getLocation</b></a>
<pre>
 public <a href="#_top_">Point</a> getLocation()
</pre>
<dl>
  <dd> Returns the location of this point.
 This method is included for completeness, to parallel the
 <code>getLocation</code> method of <code>Component</code>.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a copy of this point, at the same location.
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.Component.html#getLocation">getLocation</a>, <a href="#setLocation(java.awt.Point)">setLocation</a>, <a href="#setLocation(int, int)">setLocation</a>
  </dl></dd>
</dl>
<a name="setLocation(java.awt.Point)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setLocation"><b>setLocation</b></a>
<pre>
 public void setLocation(<a href="#_top_">Point</a> p)
</pre>
<dl>
  <dd> Sets the location of the point to the specificed location.
 This method is included for completeness, to parallel the
 <code>setLocation</code> method of <code>Component</code>.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> p - a point, the new location for this point.
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.Component.html#setLocation(java.awt.Point)">setLocation</a>, <a href="#getLocation">getLocation</a>
  </dl></dd>
</dl>
<a name="setLocation(int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setLocation"><b>setLocation</b></a>
<pre>
 public void setLocation(int x,
                         int y)
</pre>
<dl>
  <dd> Changes the point to have the specificed location.
 <p>
 This method is included for completeness, to parallel the
 <code>setLocation</code> method of <code>Component</code>.
 Its behavior is identical with <code>move(int,&nbsp;int)</code>.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> x - the <i>x</i> coordinate of the new location.
    <dd> y - the <i>y</i> coordinate of the new location.
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.Component.html#setLocation(int, int)">setLocation</a>, <a href="#getLocation">getLocation</a>, <a href="#move(int, int)">move</a>
  </dl></dd>
</dl>
<a name="move(int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="move"><b>move</b></a>
<pre>
 public void move(int x,
                  int y)
</pre>
<dl>
  <dd> Moves this point to the specificed location in the 
 (<i>x</i>,&nbsp;<i>y</i>) coordinate plane. This method
 is identical with <code>setLocation(int,&nbsp;int)</code>.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> x - the <i>x</i> coordinate of the new location.
    <dd> y - the <i>y</i> coordinate of the new location.
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.Component.html#setLocation(int, int)">setLocation</a>
  </dl></dd>
</dl>
<a name="translate(int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="translate"><b>translate</b></a>
<pre>
 public void translate(int x,
                       int y)
</pre>
<dl>
  <dd> Translates this point, at location (<i>x</i>,&nbsp;<i>y</i>), 
 by <code>dx</code> along the <i>x</i> axis and <code>dy</code> 
 along the <i>y</i> axis so that it now represents the point 
 (<code>x</code>&nbsp;<code>+</code>&nbsp;<code>dx</code>, 
 <code>y</code>&nbsp;<code>+</code>&nbsp;<code>dy</code>).
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> dx - the distance to move this point
                            along the <i>x</i> axis.
    <dd> dy - the distance to move this point
                            along the <i>y</i> axis.
  </dl></dd>
</dl>
<a name="hashCode()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="hashCode"><b>hashCode</b></a>
<pre>
 public int hashCode()
</pre>
<dl>
  <dd> Returns the hashcode for this point.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a hash code for this point.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#hashCode()">hashCode</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<a name="equals(java.lang.Object)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="equals"><b>equals</b></a>
<pre>
 public boolean equals(<a href="java.lang.Object.html#_top_">Object</a> obj)
</pre>
<dl>
  <dd> Determines whether two points are equal. Two instances of
 <code>Point</code> are equal if the values of their 
 <code>x</code> and <code>y</code> member fields, representing
 their position in the coordinate space, are the same.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> obj - an object to be compared with this point.
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the object to be compared is
                     an instance of <code>Point</code> and has
                     the same values; <code>false</code> otherwise.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#equals(java.lang.Object)">equals</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<a name="toString()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toString"><b>toString</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> toString()
</pre>
<dl>
  <dd> Returns a representation of this point and its location
 in the (<i>x</i>,&nbsp;<i>y</i>) coordinate space as a string.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a string representation of this point,
                 including the values of its member fields.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#toString()">toString</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.html">This Package</a>  <a href="java.awt.Panel.html#_top_">Previous</a>  <a href="java.awt.Polygon.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
