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

Snippets has posted 5883 posts at DZone. View Full User Profile

SwingMediaView.fx

01.15.2010
| 1554 views |
  • submit to reddit
        Hier noch die IMplementierung von SwinMedia... eigentl. ident mit dem PDF


package mm1;

import javafx.ext.swing.SwingComponent;
import java.awt.BorderLayout;
import javax.swing.JComponent;
import javax.swing.JPanel;

public static class SwingMediaView extends SwingComponent{
public var panel: JPanel;

public var playerpanel: java.awt.Component on replace{
        if(playerpanel==null){
        }
        else {
                panel.removeAll();
                panel.add(playerpanel, BorderLayout.CENTER);
        }
    }
    public override function createJComponent():JComponent{
        panel= new JPanel();
        panel.setSize(height, width);
        return panel;
    }
}