My Social Links
What's new
Litt reklame....
About me
This area does not yet contain any content.


(www.visiti.no) I work for a Norwegian IT consultancy company called Visiti. The company was established the 1st of January 2009, with Software Innovation ASA as the sole owner. The company numbers 46 consultants within the fields of consultancy, system development and project management.
Visiti AS' goal is to be a renowned provider of IT consultants, primarily aimed at the banking, insurance and public sector, but also other selected businesses where IT is a critical success factor. Visiti AS delivers services and solutions based on both Microsoft and Java technology.
 

I lead the company's Java division, and is also out in the field. Doing some real work, getting my hands dirty.

  

Entries in clas (1)

Saturday
27Jun2009

Getting started with JavaFX (in 30 minutes)

After hearing a lot of buzz about JavaFX, (and the upcoming "designer tool" demoed at Java One, scheduled for Q3/Q4), I decided to get my hands dirty with JavaFX. This is not a tutorial on JavaFX but rather references, and a summary of the experience of getting started.

 

 What is JavaFX?
According to the "all knowing Wikipedia"; "JavaFX is a software platform for creating and delivering rich Internet applications that can run across wide variety of connected devices. The current release (JavaFX 1.2, June 2009) enables building applications for desktop, browser and mobile phones. TV set-top boxes, gaming consoles, Blu-ray players and other platforms are planned."
JavaFX is not an API for GUI development, but rather a platform that uses a declarative programming language called JavaFX Script.
To have a quick view of the possibilities, take a look at the samples on javafx.com

Getting started with Eclipse
Sun has a "getting started" tutorial that looks okay over at javafx.com. It's worth noticing that there s no mention of how to get started with Eclipse (of course). I've heard a lot of praise of Netbeans lately, but learning something new, and a new IDE at the same time is not what I wanted.
I started my adventure and downloaded the 45 MB JavaFX SDK, at the same time updating my Eclipse 3.5 with a JavaFX Feature. This feature will among other things enable you to create a new "JavaFX Project from the "new Project" menu.

... A Small problem, my bad
A minor setback occurred during my first attempt to create a JavaFX project from the "new project" menu. I got the error message;”The JavaFX SDK location was not specified". This is because I am impatient, and installed the JavaFX plug-in before the JavaFX SDK. If this happens, it's just a matter of selecting the window/preferences dialog and select "class path variables" under "build path". There should be a JAVAFX_HOME class path variable pointing to the directory where the JavaFX SDK was installed.

And the first project
Creating a JavaFX project is easy. Just select create new project from the menu, and select "JavaFX Project". After that you can create new Java FX scripts, either empty, or have some example "hello world" like scripts to start playing with.

Conclusion
I was happy to see that JavaFX works with the latest eclipse. The only hiccup was a fault of my own. It's very easy to get started with JavaFX development, probably easier with Netbeans, as you can download both the IDE and SDK as a bundle. I was definitely up and running with the platform in under 30 minutes.

 References

Learing something new? I often find it very rewarding to have a book at my desk when trying out new stuff. Surfing around the web for good tutorials can be quite time consuming, why not check this book out and save some time?