Java Media Framework : la trame d'un programme

import java.awt.*;
import java.net.*;
import javax.media.*;

public class lanceAppliMult extends Frame
 implements javax.media.ControllerListener {

 // Le Player
 private transient Player masterPlayer = null;

 // Le panneau de controle (execution, avance rapide, ...) du Player
 private transient Component masterControl = null;

 // Le composant visuel (i.e. l'écran) du Player
 private transient Component masterVisualComp = null;

 public static void main (String args[]) {
  URL masterURL = null;
  lanceAppliMult app = null;

  masterURL = new URL(args[0]);
          app = new lanceAppliMult(masterURL);
  ...
 }

 public lanceAppliMult(URL masterURL) {
  ...
   masterPlayer = Manager.createPlayer(masterURL);
   masterPlayer.addControllerListener(this);
   masterPlayer.realize();
 }

 /**
   * Le traitement des evenements video
   *
   *  Cette méthode est la methode a implanter, provenant
   *  de l'interface javax.media.ControllerListener
   *
   */
 public synchronized void controllerUpdate(ControllerEvent evt) {
  if (evt instanceof RealizeCompleteEvent) {
   ...
   masterVisualComp = masterPlayer.getVisualComponent();
   if (masterVisualComp != null) {
    .....add(masterVisualComp);
   }
   else {...}

   masterControl = masterPlayer.getControlPanelComponent();
   if (masterControl != null) {
     .....add(masterControl);
   }
   else {...}
   ...
  }
  if (evt instanceof StartEvent) {
   ...
  }
 }
}