Mock tests, Interview questions, Tutorials and Tech news
 
 
Home > Programming / tutorials > Introduction to JavaFX

Introduction to JavaFX

Overview

JavaFX is a rich client platform for building cross-device applications and content. Designed to enable easy creation and deployment of rich internet applications (RIAs) with immersive media and content, the JavaFX platform ensures that RIAs look and behave consistently across diverse form factors and devices.

The JavaFX1.2 platform release includes the following components:

  • JavaFX SDK which includes the JavaFX compiler and runtime tools, graphics, media, web services, and rich text libraries to create RIAs for the desktop, browser and mobile platforms.
  • NetBeans IDE for JavaFX which provides a sophisticated integrated development environment for building, previewing, and debugging JavaFX applications. The editor features a drag-and-drop palette to quickly add JavaFX objects with transformations, effects and animation. This IDE also comes with its own set of Building Block samples and the JavaFX Mobile Emulator, a mobile phone simulator.
  • JavaFX Production Suite is a suite of tools and plugins that enable designers to export graphical assets to JavaFX applications.  (Example:: JavaFX Plugin for Adobe Photoshop and JavaFX Plugin for Adobe Illustrator)

JavaFX Vs Swing

One of the really nice things in JavaFX is the ability to drag a JavaFX application from inside your web browser to the desktop. This in turn makes it easier to create applications like WidgetFX, which provides desktop widgets.  Rich video content is made possible through the On2 video codecs which are supplied with JavaFX. It’s worth noting that these same codecs can work in your Swing applications too.

JavaFX applications are written in JavaFX Script. The script takes advantage of a general scene graph model, that allows effects, transforms and animations in your UI. Using JavaFX Script you can put user interfaces together quickly, as the language is written specifically for user interface creation. The resulting applications have a richer, smoother feel than standard Swing applications.

JavaFX Vs Adobe Flex

One of the main differences is in the deployment model. For Flex applications it is within the browser, Flex uses the Flash platform. Everyone has Flash, and Flex is able to use that as the virtual machine.

JavaFX doesn’t have that consistent platform on the Web that they can build on. Flex is still able to use Java on the back-end and Flash on the front end.

MXML is an XML language to create Flex applications. F3 is a predecessor to JavaFX. Flex uses XML as the notation, and JavaFX uses a JSON-like notation. Flex chose XML because it’s familiar to Web application developers. It’s familiar to people doing HTML development.

Flex also have a procedural language. It uses ActionScript, which is an implementation of ECMAScript, the JavaScript standard.

Flex is far more stable then JavaFX, JavaFX is fairly new.

Flex runs on flash, 95% installations world wide, only 1.2MB of Flash download compared to JavaFX + Java runtime of minimum 30 MB, this is too big consideration for publisher.

Real World Examples on JavaFX.

Please check the examples on the following link

http://www.javafx.com/samples/

JavaFX Platform Components

Tools available for the JavaFX Platform

Stand-alone SDK

If you prefer using other tools, or developing directly via the command line, you can download the stand-alone SDK.

JavaFX SDK

The SDK includes the following components (also included when you download NetBeans IDE for JavaFX):

JavaFX Desktop Runtime

JavaFX Mobile & TV Emulators (for Windows & Mac OS X)

JavaFX APIs

JavaFX Compiler

JavaFX API documentation

Samples

Useful Links related to JavaFx.

http://javafx.com/docs/gettingstarted/javafx/

Learning the JavaFX Script Programming Language – Tutorial Overview

http://java.sun.com/javafx/1/tutorials/core/

Building GUI Applications With JavaFX – Tutorial Overview

http://java.sun.com/javafx/1/tutorials/ui/

Overview

http://javafx.com/about/overview/

Download link

Download Netbeans IDE for JavaFX, JavaFX Production Suite, and the stand-alone JavaFX SDK on the javafx.com download page.

Code examples and samples of JavaFX

A fully stocked gallery of code examples and samples will ensure your success in building and deploying JavaFX applications.

FAQ

Check out the FAQs.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Mixx
  • Google Bookmarks
  • IndianPad
  • Reddit
Categories: Programming / tutorials Tags: , ,
  1. LaskaB
    February 18th, 2011 at 05:37 | #1

    @madmax Adobe Flex 4 builder is not free, but since Flex compiler went open source some free tools where created. I used FlashDevelop which work pretty nicely – of course – it doesnt have all the cool features of the flex builder…

  2. January 21st, 2011 at 10:24 | #2

    Recently I used both Adobe Flex 4 and Java Fx 1.3.1, I agree both are very powerful Rich internet graphic application development tools.

    My take on Adobe Flex 4 is, it is very easy design tool. It take care of lot of programming part by automatically generating the code. So my vote is “Easy Tool”. If you make any change to data source , change a label identifier etc, it generates code and corrects any reference inside the code.

    Java Fx 1.3.1 is little more difficult as compared to Adobe Flex, but there is no comparison the look and feel, “Graphical Effects” and this best in terms of Java compatibility.

    Adobe Flex 4 builder is not free
    Java Fx 1.3.1 + NetBeans is free. This makes a lot of difference in freelance developer community.

    Again this comparison not applicable for “Desktop application” vs “mobile application” vs “web application”

    There are further limitations for both in terms of Printing, download application to excel or csv, etc..

  3. July 28th, 2010 at 13:06 | #3

    Hi Vinay,
    Very nice post.
    BTW, I need some inputs. We have a in-house banking application which uses applets for the UI. Though technically it is the best solution but the users are not happy with the UI. We are evaluating between Flex and JavaFX. Whats your take between the two?

    Thanks,
    Subbu

  4. May 3rd, 2010 at 21:13 | #4

    @

    @Chris Wright

    Thanks Chris. Glad you liked it. We will check out JavaFX 1.3.

  5. May 3rd, 2010 at 20:33 | #5

    Very nice post. I noticed you mentioned the JavaFX 1.2 SDK. Have you checked out 1.3 that was released on the 22nd? There are many new features and improvements, as well as some special preview controls and layout.

    Thanks for posting!
    Chris

  1. June 5th, 2010 at 00:51 | #1
Get Adobe Flash playerPlugin by wpburn.com wordpress themes