import java.awt.*;
import java.awt.event.*;
import java.applet.*;

/**
    Basic Applet wrapper for StarPanel
    @author Dave Burt
    @version 1.1 9 May 2002
 */
public class StarApplet
    extends Applet
{
    private static final int DEFAULT_STARS = 50;
    private StarPanel sp;
    
    public void init()
    {
        int stars = DEFAULT_STARS;
        sp = new StarPanel(stars);
        sp.setSize(getSize().width, getSize().height);
        setBackground(Color.black);
        setLayout(null);
        add(sp);
        enableEvents(AWTEvent.COMPONENT_EVENT_MASK);
    }
    public void start()
    {
        sp.start();
    }
    public void stop()
    {
        sp.stop();
    }
    protected void processComponentEvent(ComponentEvent e)
    {
        sp.setBounds(0, 0, getSize().width, getSize().height);
    }
}

