// DisplayPanel.java

package lab04;

import java.awt.*;

/**
 * The class that actually displays the Stack
 * in the center of the app window. 
 *
 * @author J.K. Daugherty
 */
public class DisplayPanel extends javax.swing.JPanel {
    private Stack stack;

    public DisplayPanel (Stack stack) {
        this.stack = stack;
        setBackground (new Color (0xD4, 0xEC, 0xFB));
    }

/**
 * The method that renders the display area,
 * including the Stack.
 */

    protected void paintComponent (Graphics g) {
        super.paintComponent (g);
        stack.render (g, getSize());
    }
}
