/*
   This program shows how to draw "graphics" on a picture object.

   The main idea is that in Java, you draw on a "graphics context".
*/
import java.awt.Graphics;
import java.awt.Color;

public class PictureGraphics
{
  public static void main( String[] args )
  {
    Picture p = new Picture(500, 500);
    Graphics g = p.getGraphics(); // get p's "graphics context"
    g.setColor( Color.blue );     // set the drawing color
    g.drawLine(0,0, 500,500);     // draw a line in the graphics context

    p.show();
  }
}