import java.awt.*;
import javax.swing.*;

/*
<applet code="Graph.class" width="200" height="100"></applet>
*/

public class Graph extends JApplet {

  @Override
  public void paint(Graphics g) {
    super.paint(g);
    int[] is = {10, 4, 6, 2, 9, 1};
    Color[] cs = {Color.RED, Color.BLUE};
    int scale = 15;
    int i, n = is.length;

    for (i=0; i<n; i++) {
      g.setColor(cs[i%2]);
      g.fillRect(0, i*scale, is[i]*scale, scale);
    }
  }
}
