// ----------------------------------------------------------
// DisplayPanel.java

package lab06;

import java.awt.*;
import javax.swing.*;
        
/**
 * The class that represents the center panel of the top
 * level frame, where the Queue is rendered.
 */

public class DisplayPanel extends JPanel {
    private List list;

    public DisplayPanel (List list) {
        super ();
        this.list = list;

        // Make the background a light blue...
        setBackground (new Color (0xD4, 0xEC, 0xFB));
    }

/**
 * Renders the center panel contents,
 * including the graphical representation of the Queue.
 */

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