0

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?

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the answer. So, i embed javafx app in html. But the real question is, can i use javafx2 as i use javascript?
JavaFX is just a Java library (+ some native libraries) running in a JVM. It's not a language. Maybe you could update your question and explain what exactly you want to achieve?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.