PointNamePoint
DescriptionThe Point class encapsulates a pair of x and y coordinates within a single object. Class Definition
public class java.awt.Point extends java.lang.Object implements java.io.Serializable { // Variables public int x; public int y; // Constructors public Point(); Variablesxpublic int xThe coordinate that represents the horizontal position. ypublic int yThe coordinate that represents the vertical position. ConstructorsPointpublic Point()
public Point (int x, int y)
public Point (Point p)
Instance Methodsequalspublic boolean equals (Object object)
getLocationpublic Point getLocation()
hashCodepublic int hashCode()
movepublic void move (int x, int y)
setLocationpublic void setLocation (int x, int y)
public void setLocation (Point p)
toStringpublic String toString()
translatepublic void translate (int deltax, int deltay)
See AlsoObject, String |
|