当前位置: 动力学知识库 > 问答 > 编程问答 >

What is the difference between JavaFX scripting and Using Regular java Syntax while programming JavaFX Applications

问题描述:

I am looking for a detail explanation to the following question.

Can I use regular java syntax to develop JavaFX application? And if so why is the JavaFX scripting so important?

网友答案:

JavaFX Script was a language developed for JavaFX 1.x. It was dropped for JavaFX 2.x and is no longer supported or developed.

Can I use regular java syntax to develop JavaFX application?

Yes. All of the JavaFX 2.x system is accessible through regular Java language code running on a Java Virtual Machine. Here is a sample JavaFX program. You will notice it is just a Java application that provides a simple GUI.

And if so why is the JavaFX scripting so important?

Students studying the history of computer languages might interested might be interested the design of JavaFX Script's innovative binding features and declarative programming support. From a practical development point of view, JavaFX Script is completely obsolete and never used.


In addition to the standard Java API, many alternate languages, such as Ruby, Closure, Scala, JavaScript and Groovy are also able to access and use JavaFX. For scripting JavaFX applications, languages like JavaScript and Groovy take the place of the JavaFX Script language. An XML based markup called FXML replaces JavaFX Script for declarative definition of GUI scenes.

It's probably a good idea to review the JavaFX documentation in detail before asking further questions.

分享给朋友:
您可能感兴趣的文章:
随机阅读: