views:

153

answers:

1

Hi, I would like to simply ask if it is possible to embed a javafx application inside an html file. And if it is possible then I would like to know how to do this. I am open to using javascript etc. if it is required. Thanks.

+2  A: 

If you're asking about including JavaFX script inline in an HTML file, I do not think that's possible.

However, if you just want to have a JavaFX widget on a web page, then yes. Use something like this:

    <script src="http://dl.javafx.com/dtfx.js"&gt;&lt;/script&gt;
    <script>
        javafx(
        {
            archive: "HelloApplet.jar",
            draggable: true,
            width: 150,
            height: 100,
            code: "hello.HelloApplet",
            name: "Wiki"
        }
    );
    </script>

Code from Planet JFX

Eric Wendelin
Thanks, I will give that a try.
Gabe Martin