Ozan
Ozan

Reputation: 206

Using JavaFx-2 instead of Javascript

I've newly discovered javafx2 and started playing with it. However, im confused and lost in tutorials ( trying to do the ant thingie but failed yet :) but its another question ).

So, I can do cool stuff with JavaFx-2 and i really liked the mediaplayer "easiness". So, I want to use HTML,Java and CSS only. Is there anyway to do it?

Can i call javafx2 functions from HTML?

Thanks for advices and responsed.

Requested update; For example, a javascript function embeded in html. I c/p'd it from http://www.simplehtmlguide.com/javascript.php

<html>
 <head>
  <script type="text/javascript">
function functionOne() { alert('You clicked the top text'); }
function functionTwo() { alert('You clicked the bottom text'); }
 </script>
</head>
<body>
 <p><a href="#" onClick="functionOne();">Top Text</a></p>
 <p><a href="javascript:functionTwo();">Bottom Text</a></p>
</body>
</html>

now can i do the same thing with javafx2 ? Can i directly give references to its function from html?

Upvotes: 0

Views: 165

Answers (1)

Puce
Puce

Reputation: 38142

You can embed a JavaFX application in a HTML page, if this is what you mean: http://docs.oracle.com/javafx/2/deployment/deployment_toolkit.htm#BABJHEJA

Upvotes: 1

Related Questions