public class Rectangle
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private int |
height
The height of the region.
|
private int |
width
The width of the region.
|
private int |
x
The horizontal offset from the top-left corner.
|
private int |
y
The vertical offset from the top-left corner.
|
| Constructor and Description |
|---|
Rectangle()
Constructs a Rectangle class with default values.
|
Rectangle(int x,
int y,
int width,
int height) |
private int x
private int y
private int width
private int height
public Rectangle()
public Rectangle(int x,
int y,
int width,
int height)
public int getX()
public void setX(int x)
public int getY()
public void setY(int y)
public int getWidth()
public void setWidth(int width)
public int getHeight()
public void setHeight(int height)
public java.lang.String toString()
toString in class java.lang.Object