import java.awt.*;
import java.awt.event.*;
import java.applet.*;

//An abstract class from which two types of button panels are derived:
//the monthbutton class and the week button class

public abstract class ButtonPanel extends Panel implements ActionListener {


  public ButtonPanel()
  {
    super();
    add(prevButton);
    add(currentButton);
    add(updateButton);
    add(nextButton);
    prevButton.addActionListener(this);
    currentButton.addActionListener(this);
    updateButton.addActionListener(this);
    nextButton.addActionListener(this);
  }
  
  public void actionPerformed(ActionEvent evt)
  {
    System.out.println("inside buttonpanel: actionPerformed");
    String arg = evt.getActionCommand();
    if (arg.equals("<") )
      previousButtonPressed();
    if (arg.equals("Current"))
      currentButtonPressed();
    if (arg.equals("Update"))
      updateButtonPressed();
    if (arg.equals(">"))
      nextButtonPressed();

  }
  
  public abstract void nextButtonPressed();
  public abstract void currentButtonPressed();
  public abstract void updateButtonPressed();
  public abstract void previousButtonPressed();

  protected Button prevButton = new Button("<");
  protected Button currentButton = new Button("Current");
  protected Button updateButton = new Button("Update");
  protected Button nextButton = new Button(">");
  
  
}



