private void init()
  {
    // create the rectangle button
    rectButton = new Button("Rectangle");
    add(rectButton);
    rectButton.addActionListener(new ActionListener() {
      public void actionPerformed (ActionEvent e) {
        if (handler != null)
          handler.setShape(Shape.RECTANGLE);
      }
    });
    
    // create the oval button
    ovalButton = new Button("Oval");
    add(ovalButton);
    ovalButton.addActionListener(new ActionListener() {
      public void actionPerformed (ActionEvent e) {
        if (handler != null)
          handler.setShape(Shape.OVAL);
      }
    });
    
    // create the oval button
    lineButton = new Button("Line");
    add(lineButton);
    lineButton.addActionListener(new ActionListener() {
      public void actionPerformed (ActionEvent e) {
        if (handler != null)
          handler.setShape(Shape.LINE);
      }
    });
    
    
    // create the clear button
    clearButton = new Button("Clear");
    add(clearButton);
    clearButton.addActionListener(new ActionListener() {
      public void actionPerformed (ActionEvent e) {
        if (handler != null)
          handler.clearShapes();
      }
    });
  }