Using the Render class

Class:Render

Object:a 300x300 graphics window that renders one or more circles. Position 0,0 is at the upper left hand corner of the window and position 300,300 is at the lower right hand corner of the screen.

Methods or Operations:

     void addCircle(Circle c) - adds a circle to the list of circles to render at the next draw

     void draw() - renders the list of circles. NOTE: window will not refresh circles rendered with a previous draw will remain

     void redraw() - clears window, then invokes draw(). NOTE: circles rendered with a previous draw will be erased

     void removeAllCircles() - removes all circles from the list of circles.

Declaration and initialization:

Render render = new Render();         // Empty 300x300 window, origin @ upper left corner

Example:
 public static void main(String[] args)
  {
    Render render = new Render();
    Circle c0 = new Circle(120,120,30);
    
    render.addCircle(c0);
    render.draw();
    
  }

This will draw a circle of radius 30 at position 120,120 on in the window.