- JavaFX Script
Infobox_Software
name = JavaFX Script
caption =
developer =Sun Microsystems
latest_release_version = Alpha
latest_release_date =
operating_system =Cross-platform
language =
genre =Scripting language
license =GNU General Public License
website = [https://openjfx.dev.java.net/ JavaFX Script Website]JavaFX Script is a
scripting language designed bySun Microsystems , forming part of theJavaFX family of technologies on theJava Platform . JavaFX targets theRich Internet Application domain (competing withAdobe Flex andMicrosoft Silverlight ), specializing in rapid development of visually rich applications for the desktop and mobile markets. JavaFX Script works withintegrated development environment s likeNetBeans and Eclipse. JavaFX is released under theGNU General Public License , via the Sun sponsored [https://openjfx.dev.java.net OpenJFX project] ,History
JavaFX Script used to be called F3 for Form Follows Function. F3 was primarily developed by Chris Oliver, who became a Sun employee through their acquisition of
SeeBeyond Technology Corporation inSeptember 2005 .Its name was changed to JavaFX Script, and it became
open source d atJavaOne 2007.It is currently in alpha stage, [ [https://openjfx.dev.java.net/JavaFX_FAQ.html#Where_can_I_obtain_JavaFX_and.2For_more_information_on_JavaFX.3F JavaFX FAQ] ] and all the code, documentation and demos are shared in the [https://openjfx.dev.java.net/ Project OpenJFX] Development Website. The preview SDK was released on July 31, 2008. [ [http://weblogs.java.net/blog/joshy/archive/2008/07/javafx_preview.html JavaFX Preview SDK released] ]
Features
JavaFX Script is a compiled statically typed declarative
scripting language for theJava Platform providing automatic data-binding, full support for 2D graphics and standard Swing components as well as declarative animation. Because it is built on top of theJava Platform , it is easy to use any Java class inJavaFX scripts.JavaFX is able to run on any platform which has the Java Runtime installed. No modifications are needed since the JavaFX interpreter generates defaultJava bytecode . A compiler is planned for the future that will improve performance by compiling JavaFX directly into bytecode.JavaFX Script's declarative syntax for constructing user interfaces contrasts sharply with the more verbose series of method calls required to construct an equivalent interface in Swing directly.Examples
Here is a simple
Hello world program for JavaFX Script : import javafx.ext.swing.*; SwingFrame { title: "Hello World!"; width: 100; height: 50; content: Label { text: "Hello World!"; } visible: true; }It shows the following panel :This program can also be written in this way:
import javafx.ext.swing.*; var myFrame:SwingFrame = new SwingFrame(); var myLabel:Label = new Label(); myLabel.text = "Hello World!"; myFrame.width = 200; myFrame.height = 50; myFrame.visible = true; myFrame.content = myLabel;
Prerequisites
Java SE 5 or Java SE 6 is required to support JavaFX Script development. Developers may work with JavaFX Script using the Eclipse or
NetBeans IDEs by incorporating the necessary plugins.References
Books
*cite book
last = James
first = L. Weaver
authorlink =
coauthors =
title = JavaFX Script: Dynamic Java Scripting for Rich Internet/Client-side Applications
edition = First Edition
series = ISBN 978-1590599457
date = 2007-10-29
publisher =Apress See also
* Ajax
*Java applet , a means of deploying Java applications inside a web page.
*JavaFX , a family of products and technologies intended to be used to create Rich Internet Applications (RIAs).
*Silverlight , a rival technology fromMicrosoft .
* Swing, the underlying user interface library employed by JavaFX Script.External links
* [https://openjfx.dev.java.net/ JavaFX Main Site]
* [http://www.sun.com/software/javafx/index.jsp Sun's JavaFX overview]
* [http://blogs.sun.com/chrisoliver/category/F3 Chris Oliver's blog, F3 category]
* [http://learnjavafx.typepad.com James Weaver's Learn JavaFX Weblog]
* [http://java.sun.com/developer/technicalArticles/scripting/javafxpart1/ Sun.com - Learning JavaFX Script: An Introduction for Java Programmers]
* [http://www.nytimes.com/2007/05/08/technology/08sun.html Sun Plans Version of Java for Web-Linked Cellphones] (New York Times article)
* [http://news.com.com/Sun+tries+again+with+consumer-flavored+Java/2100-1007_3-6181922.html Sun tries again with consumer-flavored Java] (CNET article)
* [http://jfx.wikia.com/wiki/Main_Page Planet JFX Community Wiki] (how-to's, code samples, tutorials)
* [http://molgav.nn.ru Swing/JavaFx tutorials] (Russian language)
Wikimedia Foundation. 2010.