import java.awt.*;
import javax.swing.*;

/**
 * An example that uses a media player
 *
 * @version 1.0
 * @author  Prof. David Bernstein, James Madison University
 *
 */
public class PlayerPanelDriver
{
    /**
     * The entry point of the example
     *
     * @param args  The command line arguments
     */
    public static void main(String[] args)
    {
	boolean          includeVisual;
	JFrame           f;
	Container        contentPane;
	PlayerPanel      p;


	f = new JFrame();

	contentPane = f.getContentPane();
	contentPane.setLayout(new BorderLayout());

	if (args[0].indexOf(".mpg") >= 0) includeVisual = true;
	else                              includeVisual = false;

	p = new PlayerPanel(includeVisual, true);

	contentPane.add(p, BorderLayout.CENTER);

	f.setSize(320,300);
	f.setVisible(true);


	p.loadFile(args[0]);
    }
}
