package util;
import javax.swing.*;
import java.awt.event.*;

/**
 * Abstract class for subclasses of JPanel which generate ActionEvents,
 * or contain components which generate ActionEvents, and which provide
 * a single method addActionListener() to register a listener with the
 * ActionEvent generating components.  
 * 
 * There is no guarantee that addActionListener() will actually perform
 * its intended function.  The actual behavior depends on the specific
 * subclass.  The default addActionListener() method only prints a warning
 * message to standard output.
 */

public abstract class ActionPanel extends JPanel {

    /**
     * The default addActionListener() method only prints a warning
     * message to standard output.  This method should be explicitly
     * overridden by subclasses.
     */

    public void addActionListener(ActionListener listener) {
        System.out.println("You are supposed to override ActionPanel.addActionListener();");
    };
}

