The Artima Developer Community
Sponsored Link

Java Community News
Anghel Leonard's JavaFX Tutorial

2 replies on 1 page. Most recent reply: Aug 10, 2007 1:46 AM by Jeroen Wenting

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Frank Sommers

Posts: 0
Nickname: fsommers
Registered: Jan, 2002

Anghel Leonard's JavaFX Tutorial Posted: Aug 2, 2007 3:00 PM
Reply to this message Reply
Summary
JavaFX Script is a domain-specific language for defining rich-client interfaces in Java. Anghel Leonard recently wrote a Java FX tutorial, showing with detailed examples how to affect a variety of UI elements with this language.
Advertisement

Earlier this year, Sun announced JavaFX, a domain-specific language targeting the rapid development of rich-client Java user interfaces. JavaFX consists of two main components: JavaFX Script, a declarative script-like language, and JavaFX mobile. (For related Artima interviews, see Jacob Lehrbaum Explains JavaFX Mobile, and Flex and JavaFX: An Interview with Adobe's James Ward from JavaOne 2007.)

In a recently published article, Introduction to JavaFX Script, Anghel Leonard provides a more detailed overview of JavaFX, showing how to create a variety of UI components with this language:

[JavaFX] is very different from Java code, but has a high degree of interactivity with Java classes. Many classes of the JavaFX Script are designed for implementing Swing and Java 2D functionalities more easily. With JavaFX Script you can develop GUIs, animations, and cool effects for text and graphics using only a few straightforward lines of code. And, as a plus, you can wrap Java and HTML code into JavaFX Script... With [JavaFX], you can easily build rich, dynamic interfaces in much less time than you could build something comparable in Java with Swing and Java 2D.

There are at least three methods for working with JavaFX... The simplest and quickest method is based on a lightweight tool called JavaFXPad. The major advantage of using this tool is that you can almost immediately see the effect of the changes you are making in the editor... Another way to work with JavaFX is to use the JavaFX Script Plug-in for NetBeans 5.5 or a JavaFX Script Plug-in for Eclipse 3.2...

The article describes the various primitive types supported by JavaFX, and compares the language's operators and syntax with Java's. In addition to the usual control flow structures and functions, JavaFX also has the concept of procedures, marked by an operation keyword, providing a grouping construct for a number of statements, according to the Java FX language specification.

Perhaps the two most interesting aspects of JavaFX is how it interacts with both Java code and with HTML and CSS. Leonard's article shows examples of implementing business logic in Java inside JavaFX code, and also of displaying an HTML table with JavaFX.

What do you think of JavaFX Script as a language?


Achilleas Margaritis

Posts: 674
Nickname: achilleas
Registered: Feb, 2005

Re: Anghel Leonard's JavaFX Tutorial Posted: Aug 3, 2007 1:43 AM
Reply to this message Reply
I like it very much. It has some characteristics like triggers, attributes and the dur operator which make programming very easy. Of course I would have to use it to make a definitive conclusion.

Jeroen Wenting

Posts: 88
Nickname: jwenting
Registered: Mar, 2004

Re: Anghel Leonard's JavaFX Tutorial Posted: Aug 10, 2007 1:46 AM
Reply to this message Reply
any language that (as the article suggests) can be written only in the context of an IDE (even if it's a few of them) is fundamentally flawed.

Flat View: This topic has 2 replies on 1 page
Topic: Yahoo Releases YUI 2.3 Ajax Library Previous Topic   Next Topic Topic: Should Java Provide Internal Iterators?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use