package zizouz.crime.demo;



public class VideoPlayer extends javafx.embed.swing.JFXPanel implements KeyListener, ComponentListener 
{


}

@@ -25,116 +25,1904 @@
 o;%0A%0A
-%0A%0Apublic class VideoPlayer extends javafx.embed.swing.JFXPanel implements KeyListener, ComponentListener %0A%7B%0A%0A
+import java.io.File;%0A%0Aimport java.awt.event.KeyListener;%0Aimport java.awt.event.KeyEvent;%0Aimport java.awt.event.ComponentListener;%0Aimport java.awt.event.ComponentEvent;%0A%0Aimport javafx.scene.media.Media;%0Aimport javafx.scene.media.MediaPlayer;%0Aimport javafx.scene.media.MediaPlayer.Status;%0Aimport javafx.scene.media.MediaView;%0Aimport javafx.scene.layout.BorderPane;%0Aimport javafx.scene.paint.Paint;%0Aimport javafx.scene.Scene;%0A%0Aimport javax.swing.JFrame;%0A%0Apublic class VideoPlayer extends javafx.embed.swing.JFXPanel implements KeyListener, ComponentListener %0A%7B%0A%09private static final long serialVersionUID = 11521199786L;%0A%09public static final String path = new File(%22./Resources/intro.mp4%22).toURI().toString();%0A%09%0A%09public VideoPlayer() %0A%09%7B%0A%09%09super();%0A%09%09%0A%09%09this.file = new Media(VideoPlayer.path);%0A%09%09this.player = new MediaPlayer(this.file);%0A%09%09this.view = new MediaView(this.player);%0A%09%09%0A%09%09this.pane = new BorderPane();%0A%09%09this.fxScene = new Scene(this.pane);%0A%09%09%0A%09%09this.pane.setCenter(this.view);%0A%09%09%0A%09%09this.fxScene.setFill(Paint.valueOf(%22black%22));%0A%09%09%0A%09%09this.addComponentListener(this);%0A%09%09this.addKeyListener(this);%0A%09%09%0A%09%09this.setScene(this.fxScene);%0A%09%7D%0A%09%0A%09protected final Media file;%0A%09protected final MediaPlayer player;%0A%09protected final MediaView view;%0A%09protected final BorderPane pane;%0A%09protected final Scene fxScene;%0A%09%0A%09@Override%0A%09public void keyPressed(KeyEvent event) %0A%09%7B%0A%09%09%0A%09%7D%0A%09@Override%0A%09public void keyReleased(KeyEvent event) %0A%09%7B%0A%09%09switch (event.getKeyCode())%0A%09%09%7B%0A%09%09%09case KeyEvent.VK_SPACE:%0A%09%09%09%09boolean playing = this.player.getStatus().equals(Status.PLAYING);%0A%09%09%09%09if (playing) %0A%09%09%09%09%09this.player.pause();%0A%09%09%09%09else%0A%09%09%09%09%09this.player.play();%0A%09%09%09%09return;%0A%09%09%09case KeyEvent.VK_ENTER:%0A%09%09%09%09boolean playing = this.player.getStatus().equals(Status.PLAYING);%0A%09%09%09%09this.player.stop();%0A%09%09%09%09if (playing)%0A%09%09%09%09%09this.player.play();%0A%09%09%09%09return;%0A%09%09%7D%0A%09%7D%0A%09@Override%0A%09public void keyTyped(KeyEvent event) %0A%09%7B%0A%09%09%0A%09%7D%0A%09%0A%09%0A%09
 %0A%7D%0A

Update VideoPlayer.java