Rectangle.Rectangle
Class Overview | Class Members | 
  This Package | 
All Packages
 public Rectangle()
Description
 Constructs a new rectangle whose top-left corner is at (0, 0) 
 in the coordinate space, and whose width and height are zero.
 public Rectangle( Rectangle r )
Parameters
-  r 
-  a rectangle from which to copy initial values.
  
Description
 Constructs a new rectangle, initialized to match the values of
 the specificed rectangle.
  
 public Rectangle( int x,
                  int y,
                  int width,
                  int height )
Parameters
-  x 
-  the x coordinate.
    
-  y 
-  the y coordinate.
    
-  width 
-  the width of the rectangle.
    
-  height 
-  the height of the rectangle.
  
Description
 Constructs a new rectangle whose top-left corner is specified as
 (x, y) and whose width and height 
 are specified by the arguments of the same name.
  
 public Rectangle( int width,
                  int height )
Parameters
-  width 
-  the width of the rectangle.
    
-  height 
-  the height of the rectangle.
  
Description
 Constructs a new rectangle whose top-left corner is at (0, 0) 
 in the coordinate space, and whose width and height are specified 
 by the arguments of the same name.
  
 public Rectangle( Point p,
                  Dimension d )
Parameters
-  p 
-  a point, the top-left corner of the rectangle.
    
-  d 
-  a dimension, representing the width and height.
  
Description
 Constructs a new rectangle whose top-left corner is specified 
 by the point argument, and whose width and height  
 are specified by the dimension argument.
  
 public Rectangle( Point p )
Parameters
-  p 
-  the top left corner of the rectangle.
  
Description
 Constructs a new rectangle whose top-left corner is the  
 specified point, and whose width and height are zero.
  
 public Rectangle( Dimension d )
Parameters
-  d 
-  a dimension, specifying width and height.
  
Description
 Constructs a new rectangle whose top left corner is  
 (0, 0) and whose width and height are specified  
 by the dimension argument.