how to set fullsceen mode?
how to set fullsceen mode for this player?
import java.awt.*;
import java.io.File;
import javax.media.*;
import javax.media.protocol.DataSource;
import javax.swing.*;
publicclass PlayFilesextends JFrameimplements ControllerListener{
private Container cont;
private JPanel jPPlayer =new JPanel();
publicstaticvoid main(String[] args)throws Exception
{
new PlayFiles("H:/video/Chemical Brothers/Chemical Brothers - Get Yourself High.mpg");
}
public PlayFiles(String loc)throws Exception{
super("MediaPlayer");
setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
File dir =new File(loc);
cont = getContentPane();
jPPlayer.setLayout(new BorderLayout());
cont.add(jPPlayer);
playFile(dir);
pack();
setVisible(true);
}
publicvoid controllerUpdate(ControllerEvent e)
{
Processor p = (Processor)e.getSourceController();
if(einstanceof ConfigureCompleteEvent){
System.out.println("ConfigureCompleteEvent");
p.setContentDescriptor(null);
p.realize();
}
elseif(einstanceof RealizeCompleteEvent){
System.out.println("RealizeCompleteEvent");
try{
Component c = p.getVisualComponent();
if(c !=null){
jPPlayer.add(c);
pack();
}
}catch(Exception eX){
eX.printStackTrace();
}
p.start();
validate();
}
elseif(einstanceof EndOfMediaEvent){
System.out.println("EndOfMediaEvent");
Component c = p.getVisualComponent();
jPPlayer.remove(c);
validate();
p.removeControllerListener(this);
}
}
privatevoid playFile(File f)throws Exception{
System.out.println("file - '" + f.getPath()+"'");
MediaLocator mL=new MediaLocator("file:" + f.getCanonicalPath());
DataSource dS = Manager.createDataSource(mL);
Processor proc = Manager.createProcessor(dS);
proc.addControllerListener(this);
proc.configure();
}
}

