1 public class mediaPlayer extends JFrame
2 {
3 public mediaPlayer()
4 {
5 setLayout(new BorderLayout());
6
7 //file you want to play
8 URL mediaURL = Player mediaPlayer = Manager.createRealizedPlayer(mediaURL);
9 //get components for video and playback controls
10 Component video = mediaPlayer.getVisualComponent();
11 Component controls = mediaPlayer.getControlPanelComponent();
12 add(video,BorderLayout.CENTER);
13 add(controls,BorderLayout.SOUTH);
14 }
15 }