import java.applet.Applet;
import java.awt.*;

/** An example to illustrate the GraphicsUtil package.
 *  The thick lines, rectangles, etc. have a normal
 *  sized one drawn in the center for comparison.
 */

public class GraphicsUtilDemo extends Applet {
  public void init() {
    setBackground(Color.white);
  }

  public void paint(Graphics g) {
    int x=50, top=30;
    for(int i=0; i<10; i++) {
      x = 50;
      // Thick arc
      GraphicsUtil.drawArc(g, x, 60*i+top, 75, 75,
                           30*i, 90, 2*i+1,
                           Color.lightGray);
      // Regular arc
      g.drawArc(x, 60*i+top, 75, 75, 30*i, 90);
      x = x + 100;
      // Thick rectangle
      GraphicsUtil.drawRect(g, x, 60*i+top, 75, 35,
                            2*i+1, Color.gray);
      // Regular rectangle
      g.drawRect(x, 60*i+top, 75, 35);
      x = x + 100;
      // Thick oval
      GraphicsUtil.drawOval(g, x, 60*i+top, 75, 35,
                            2*i+1, Color.darkGray);
      // Regular oval
      g.drawOval(x, 60*i+top, 75, 35);
      x = x + 100;
      // Thick rounded rectangle
      GraphicsUtil.drawRoundRect(g, x, 60*i+top, 75, 35,
                                 20, 10,
                                 2*i+1, Color.lightGray);
      // Regular rounded rectangle
      g.drawRoundRect(x, 60*i+top, 75, 35, 20, 10);
      x = x + 100;
      // Thick 3D rectangle
      GraphicsUtil.draw3DRect(g, x, 60*i+top, 75, 35,
                              true, 2*i+1, Color.gray);
    }
    for(x=-150; x<=150; x=x+75)
      for(int y=-250; y<=250; y=y+100)
        // Thick line
        GraphicsUtil.drawLine(g, 700, 350, 700+x, 350+y,
                              20, Color.gray);
    for(x=-150; x<=150; x=x+75)
      for(int y=-250; y<=250; y=y+100)
        // Regular line
        g.drawLine(700, 350, 700+x, 350+y);
  }
}

