package buttons2;
import javax.swing.*;

/**
 * Ramka z panelem z przyciskami.
 * @version 1.00 2007-11-02
 * @author Cay Horstmann
 */
public abstract class ButtonFrame extends JFrame
{
   public static final int DEFAULT_WIDTH = 300;
   public static final int DEFAULT_HEIGHT = 200;

   protected JPanel panel;
   protected JButton yellowButton;
   protected JButton blueButton;
   protected JButton redButton;

   protected abstract void addEventHandlers();

   public ButtonFrame()
   {
      setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);

      panel = new JPanel();
      add(panel);

      yellowButton = new JButton("Żółty");
      blueButton = new JButton("Niebieski");
      redButton = new JButton("Czerwony");

      panel.add(yellowButton);
      panel.add(blueButton);
      panel.add(redButton);
      
      addEventHandlers();
   }
}
