DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
MyMedia.fx
Das hier ist meine MyMedia.fx sie ist aehnlich wie die JMFView.fx aus unserem PDF.
package mm1;
import javafx.scene.CustomNode;
import javafx.scene.Group;
import javafx.scene.Node;
public class MyMedia extends CustomNode {
public var url: java.net.URL;
public var view:SwingMediaView;
public override function create(): Node{
var player:MyJMFPlayer = new MyJMFPlayer();
player.closePlayer();
player = new MyJMFPlayer(url.toString());
var comp:java.awt.Component = bind player.getVisualComponent();
view = SwingMediaView{
playerpanel: comp;
translateX:10 //nutzt diese Zeilen um euere Componente richtig zu positionieren
translateY:18
};
return Group{
content: [view]
}
}
}





