Class not being called
Here is the application.
import java.io.*;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import de.humatic.dsj.*;
public class Movie implements ActionListener
{
JButton b;
JPanel pane;
public Component createComp()
{
pane = new JPanel();
b = new JButton("Media Player");
pane.add(b);
b.addActionListener(this);
return pane;
}
public void actionPerformed(ActionEvent ae)
{
Player p = new Player();
}
public static void main(String agrs[])
{
JFrame.setDefaultLookAndFeelDecorated(true);
JFrame frame = new JFrame("Media Player");
Movie m = new Movie();
Component comp = m.createComp();
frame.getContentPane().add(comp);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setSize(800,600);
frame.setVisible(true);
}
};
Here iam giving Player.java also
import java.io.*;
import de.humatic.dsj.*;
import javax.swing.*;
public class Player
{
public static void main(String args[])throws Exception
{
String path = "http://localhost:8080/seattle.wmv";
DSMovie ds = new DSMovie(path);
JFrame.setDefaultLookAndFeelDecorated(true);
JFrame f = new JFrame("Media Player");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(ds);
f.pack();
f.setVisible(true);
}
};

