Content deleted Content added
m →External links: archive link repair, may include: archive.* -> archive.today, and http->https for ghostarchive.org and archive.org (wp:el#Specifying_protocols) |
|||
(19 intermediate revisions by 15 users not shown) | |||
Line 2:
{{Infobox programming language
| name = JavaFX
| logo =
| logo size = 220px
| developer = [[Sun Microsystems]]
| latest release version = 1.2
| latest release date = {{
| latest preview version =
| latest preview date =
Line 13 ⟶ 14:
| website = http://javafx.com/
}}
'''JavaFX Script''' was a [[scripting language]] designed by [[Sun Microsystems]], forming part of the [[JavaFX]] family of technologies on the [[Java Platform]].
JavaFX targeted the [[Rich Internet Application]] ___domain (competing with [[Adobe Flex]] and [[Microsoft Silverlight]]), specializing in rapid development of visually rich applications for the desktop and mobile markets. JavaFX Script works with [[integrated development environment]]s such as [[NetBeans]], [[Eclipse (software)|Eclipse]] and [[IntelliJ IDEA]]. JavaFX is released under the [[GNU General Public License]], via the Sun sponsored [
==History==
<!-- Image with unknown copyright status removed: [[File:ig_javafx_architecture.jpg|300px|thumb|JavaFX Script will simplify the development of interactive applications for virtually any device.]] -->
JavaFX Script used to be called '''F3''' for '''F'''orm '''F'''ollows '''F'''unction. F3 was primarily developed by
Its name was changed to JavaFX Script, and it became [[open source]]d at [[JavaOne]] 2007.
<!-- All the code, documentation and demos are shared in the [https://openjfx.dev.java.net/ Project OpenJFX] Development Website. (This is no more the case)-->JavaFX 1.0 was released on December 4, 2008.<ref>
On September 27, 2010 Stephen Chin announced
On April 8, 2012 a project was created with the intention of resurrecting and enhancing the original F3 programming language, but the project appears to have been discontinued in August 2015.<ref>{{Citation |last=unktomi |title=unktomi/form-follows-function |date=2022-07-31 |url=https://github.com/unktomi/form-follows-function |access-date=2023-03-30}}</ref>
== Features ==
Line 34 ⟶ 36:
Through its standard [[JavaFX]] APIs it supported [[retained mode]] vector graphics, video playback and standard [[Swing (Java)|Swing]] components.
Although F3 began life as an [[interpreted language]], prior to the first preview release (Q3 2008) JavaFX Script had shifted focus to being predominantly compiled. Interpreted JavaFX Script is still possible, via the [[JSR 223]] 'Scripting for Java' bridge. Because it is built on top of the [[Java Platform]], it is easy to use [[Java (programming language)|Java]] classes in JavaFX Script code. Compiled JavaFX Script was able to run on any platform that has a recent [[Java Runtime Environment|Java Runtime]] installed.
== Syntax ==
Here is a simple [[Hello world program]] for JavaFX Script
<syntaxhighlight lang="java">
</syntaxhighlight>
It shows the following window/frame :
Line 65 ⟶ 67:
[[File:HelloWorld Java FX.jpg|260px]]
This program can also be written in JavaFX Script using a procedural style this way:
<syntaxhighlight lang="java">
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
var myLabel:Label = new Label();▼
var myFont: Font = Font.font(null, 24);
myLabel.text = "Hello World!";▼
myFrame.width = 200;▼
myFrame.height = 50;▼
myText.font = myFont;
myText.x = 10;
myFrame.content = myLabel;▼
myText.y = 30;
myText.content = "Hello World";
var myScene:Scene = new Scene();
var myStage: Stage = new Stage();
myStage.scene = myScene;
</syntaxhighlight>
Line 102 ⟶ 115:
}}
* {{citation
|
|
|
|
|
|
|
|
}}
* {{citation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|access-date = August 2, 2009
|archive-date = August 15, 2009
|archive-url = https://web.archive.org/web/20090815082457/http://apress.com/book/view/1430218754
|url-status = dead
}}
* {{citation
|
|
|
|
|
|
|
|
|
|
|
|
}}
* {{citation
|
|
|
|
|
|
|
|
|
|
}}
* {{citation
| first = James L.
| last
| date
| title = JavaFX Script: Dynamic Java Scripting for Rich Internet/Client-side Applications
| publisher = [[Apress]]
| pages = 200
| isbn
| url
| access-date = August 2, 2009
| archive-date = March 23, 2012
| archive-url = https://web.archive.org/web/20120323194640/http://www.apress.com/book/view/1590599454
| url-status = dead
}}
{{refend}}
==External links==
* [http://javafx.com/ JavaFX Main Site] {{Webarchive|url=https://web.archive.org/web/20110713091051/http://javafx.com/ |date=2011-07-13 }}
* [http://www.sun.com/software/javafx/index.jsp Sun's JavaFX overview]
* [http://blogs.oracle.com/chrisoliver/category/F3 Chris Oliver's blog, F3 category] {{Webarchive|url=https://web.archive.org/web/20131212225219/https://blogs.oracle.com/chrisoliver/category/F3 |date=2013-12-12 }}
* [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]
|