Created
May 16, 2013 01:48
-
-
Save aligoren/5588830 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package oynatici; | |
import javafx.application.Application; | |
import javafx.scene.Group; | |
import javafx.scene.Scene; | |
import javafx.scene.media.Media; | |
import javafx.scene.media.MediaPlayer; | |
import javafx.scene.media.MediaView; | |
import javafx.scene.paint.Color; | |
import javafx.stage.Stage; | |
/** | |
* Created with IntelliJ IDEA. | |
* User: ali | |
* Date: 16.05.2013 | |
* Time: 04:13 | |
* To change this template use File | Settings | File Templates. | |
*/ | |
public class MedyaOynatici extends Application { | |
public static void main(String[] args) { | |
launch(args); | |
} | |
@Override | |
public void start(Stage stage) throws Exception { | |
String adres = "C:/Users/admin/Desktop/MediaPlayer/2.avi"; | |
Group root = new Group(); | |
Media medya = new Media(adres); | |
MediaPlayer oynatan = new MediaPlayer(medya); | |
MediaView goster = new MediaView(oynatan); | |
root.getChildren().add(goster); | |
Scene sahne = new Scene(root, 400, 400, Color.BLACK); | |
stage.setScene(sahne); | |
stage.show(); | |
oynatan.play(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment