View RSS Feed

Java AWT

Java Abstract Window Toolkit (AWT)

  1. Drawing a Point

    by , 03-06-2012 at 08:45 PM
    Point class creates location presenting x,y coordinate space. Point class consist of these sub classes.

    • Point2D.Float
    • Point2D.Double


    Double precision and float are provided by these given classes to store the pointís coordinates, respectively.
    Java Code:
    //Create Point2D.Double
    Point2D.Double point = new Point2D.Double(x, y);
    For creation of coordinate along with 0,0, default constructor Point 2D.Double can be used.
    Pointís position ...
    Categories
    Graphics